<?xml version="1.0" encoding="UTF-8" ?>

<DataIntegratorExport repositoryVersion="12.2.2.0000" productVersion="12.2.3.2">

<DIDatabaseDatastore name="DW_DS" typeId="3" >

<DIAttributes>

<DIAttribute name="DBLiveLoad" value="no"/>

<DIAttribute name="application_type" value="Custom"/>

<DIAttribute name="cdc_enabled" value="no"/>

<DIAttribute name="datastore_repotype" value="local"/>

<DIAttribute name="ds_configuration_enabled" value="yes"/>

<DIAttribute name="ds_configurations" hasNestedXMLTree ="true">


<DSConfigurations>
<DSConfiguration default="true" name="Default">
<case_sensitive>no</case_sensitive>
<database_type>Microsoft_SQL_Server</database_type>
<db_alias_name1>DW_ALIAS</db_alias_name1>
<db_alias_user1>dwt</db_alias_user1>
<loader_xact_size>1000</loader_xact_size>
<locale_codepage>&lt;default&gt;</locale_codepage>
<locale_language>&lt;default&gt;</locale_language>
<locale_territory>&lt;default&gt;</locale_territory>
<mssql_windows_authentication>no</mssql_windows_authentication>
<password>;C7D0EC161CA52183B3F6AA62065D16D75A3E6AAF455B3AE46139988B48682A4A</password>
<sql_server_database>XsTarget</sql_server_database>
<sql_server_dataserver>localhost,1433</sql_server_dataserver>
<sql_server_version>Microsoft SQL Server 2005</sql_server_version>
<user>dwt</user>
</DSConfiguration>
</DSConfigurations>


</DIAttribute>

<DIAttribute name="enable_data_transfer" value="yes"/>

<DIAttribute name="import_unknown_type" value="no"/>

<DIAttribute name="name" value="DW_DS"/>

<DIAttribute name="unknown_type_size" value="255"/>

</DIAttributes>

</DIDatabaseDatastore>

<DIDatabaseDatastore name="DW_ABC_DS" typeId="3" >

<DIAttributes>

<DIAttribute name="DBLiveLoad" value="no"/>

<DIAttribute name="application_type" value="Custom"/>

<DIAttribute name="cdc_enabled" value="no"/>

<DIAttribute name="datastore_repotype" value="local"/>

<DIAttribute name="ds_configuration_enabled" value="yes"/>

<DIAttribute name="ds_configurations" hasNestedXMLTree ="true">


<DSConfigurations>
<DSConfiguration default="true" name="Default">
<case_sensitive>no</case_sensitive>
<database_type>Microsoft_SQL_Server</database_type>
<db_alias_name1>DW_ABC_ALIAS</db_alias_name1>
<db_alias_user1>dwabc</db_alias_user1>
<loader_xact_size>1000</loader_xact_size>
<locale_codepage>&lt;default&gt;</locale_codepage>
<locale_language>&lt;default&gt;</locale_language>
<locale_territory>&lt;default&gt;</locale_territory>
<mssql_windows_authentication>no</mssql_windows_authentication>
<password>;89770408927C5ECAB76D9855E0DA5FE4F25B0E2949263E3397D5BD72B1A30930</password>
<sql_server_database>XsStaging</sql_server_database>
<sql_server_dataserver>localhost,1433</sql_server_dataserver>
<sql_server_version>Microsoft SQL Server 2005</sql_server_version>
<user>dwabc</user>
</DSConfiguration>
</DSConfigurations>


</DIAttribute>

<DIAttribute name="enable_data_transfer" value="yes"/>

<DIAttribute name="import_unknown_type" value="no"/>

<DIAttribute name="name" value="DW_ABC_DS"/>

<DIAttribute name="unknown_type_size" value="255"/>

</DIAttributes>

</DIDatabaseDatastore>

<DIDatabaseDatastore name="SRCSTAGING_DS" typeId="3" >

<DIAttributes>

<DIAttribute name="DBLiveLoad" value="no"/>

<DIAttribute name="application_type" value="Custom"/>

<DIAttribute name="cdc_enabled" value="no"/>

<DIAttribute name="datastore_repotype" value="local"/>

<DIAttribute name="ds_configuration_enabled" value="yes"/>

<DIAttribute name="ds_configurations" hasNestedXMLTree ="true">


<DSConfigurations>
<DSConfiguration default="true" name="Default">
<case_sensitive>no</case_sensitive>
<database_type>Microsoft_SQL_Server</database_type>
<db_alias_name1>SRCSTAGING_ALIAS</db_alias_name1>
<db_alias_user1>dws</db_alias_user1>
<loader_xact_size>1000</loader_xact_size>
<locale_codepage>&lt;default&gt;</locale_codepage>
<locale_language>&lt;default&gt;</locale_language>
<locale_territory>&lt;default&gt;</locale_territory>
<mssql_windows_authentication>no</mssql_windows_authentication>
<password>;085A6DF93DA01ED1DEA3BB1DC1D656C0EF56E65913FB53605B75804428674DE2</password>
<sql_server_database>XsStaging</sql_server_database>
<sql_server_dataserver>localhost,1433</sql_server_dataserver>
<sql_server_version>Microsoft SQL Server 2005</sql_server_version>
<user>dws</user>
</DSConfiguration>
</DSConfigurations>


</DIAttribute>

<DIAttribute name="enable_data_transfer" value="yes"/>

<DIAttribute name="import_unknown_type" value="no"/>

<DIAttribute name="name" value="SRCSTAGING_DS"/>

<DIAttribute name="unknown_type_size" value="255"/>

</DIAttributes>

</DIDatabaseDatastore>

<DIDatabaseDatastore name="DW_METADATA_DS" typeId="3" >

<DIAttributes>

<DIAttribute name="DBLiveLoad" value="no"/>

<DIAttribute name="application_type" value="Custom"/>

<DIAttribute name="cdc_enabled" value="no"/>

<DIAttribute name="datastore_repotype" value="local"/>

<DIAttribute name="ds_configuration_enabled" value="yes"/>

<DIAttribute name="ds_configurations" hasNestedXMLTree ="true">


<DSConfigurations>
<DSConfiguration default="true" name="Default">
<case_sensitive>no</case_sensitive>
<database_type>Microsoft_SQL_Server</database_type>
<db_alias_name1>DW_METADATA_ALIAS</db_alias_name1>
<db_alias_user1>dwmetadata</db_alias_user1>
<loader_xact_size>1000</loader_xact_size>
<locale_codepage>&lt;default&gt;</locale_codepage>
<locale_language>&lt;default&gt;</locale_language>
<locale_territory>&lt;default&gt;</locale_territory>
<mssql_windows_authentication>no</mssql_windows_authentication>
<password>;085A6DF93DA01ED1DEA3BB1DC1D656C0EF56E65913FB53605B75804428674DE2</password>
<sql_server_database>XsStaging</sql_server_database>
<sql_server_dataserver>localhost,1433</sql_server_dataserver>
<sql_server_version>Microsoft SQL Server 2005</sql_server_version>
<user>dwmetadata</user>
</DSConfiguration>
</DSConfigurations>


</DIAttribute>

<DIAttribute name="enable_data_transfer" value="yes"/>

<DIAttribute name="import_unknown_type" value="no"/>

<DIAttribute name="name" value="DW_METADATA_DS"/>

<DIAttribute name="unknown_type_size" value="255"/>

</DIAttributes>

</DIDatabaseDatastore>

<DITable name="ALLOCATION_METRIC" owner="dwt" datastore="DW_DS" database="XsTarget" description="" >

<DIProperties>

<DIAttribute name="Table_Type" value="TABLE" />

<DIAttribute name="Estimated_Row_Count" value="50000" />

<DIAttribute name="Loader_Is_Template_Table" value="no" />

<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />

<DIAttribute name="Number_Of_Rows_Rejected" value="0" />

<DIAttribute name="Number_Of_Inserts" value="0" />

<DIAttribute name="Number_Of_Updates" value="0" />

<DIAttribute name="Number_Of_Deletes" value="0" />

<DIAttribute name="Elapsed_Time_For_Load" value="0 Seconds" />

<DIAttribute name="db_alias_name" value="DW_ALIAS" />

</DIProperties>

<DIColumn name="id" datatype="DECIMAL" precision="19" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="METRIC_NAME" datatype="VARCHAR" size="255" nullable="true" >

</DIColumn>

<DIColumn name="METRIC_DESCRIPTION" datatype="VARCHAR" size="255" nullable="true" >

</DIColumn>

<DIColumn name="DIMENSION_NAME" datatype="VARCHAR" size="255" nullable="true" >

</DIColumn>

<DIColumn name="PERIOD_ID" datatype="DECIMAL" precision="19" scale="0" nullable="true" >

</DIColumn>

<DIColumn name="DIMENSION_ID" datatype="DECIMAL" precision="19" scale="0" nullable="true" >

</DIColumn>

<DIColumn name="DIMENSION_DK" datatype="DECIMAL" precision="19" scale="0" nullable="true" >

</DIColumn>

<DIColumn name="METRIC_AMOUNT" datatype="DOUBLE" nullable="true" >

</DIColumn>

<DIColumn name="MD_DURABLE_KEY" datatype="DECIMAL" precision="19" scale="0" nullable="true" >

</DIColumn>

<DIColumn name="MD_CREATEDDATE" datatype="DATETIME" nullable="true" >

</DIColumn>

<DIColumn name="MD_LASTMODDATE" datatype="DATETIME" nullable="true" >

</DIColumn>

<DIColumn name="MD_DELETEDDATE" datatype="DATETIME" nullable="true" >

</DIColumn>

<DIColumn name="MD_TRANSENDDATE" datatype="DATETIME" nullable="true" >

</DIColumn>

<DIColumn name="MD_TRANSLASTIND" datatype="VARCHAR" size="255" nullable="true" >

</DIColumn>

<DIColumn name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="255" nullable="true" >

</DIColumn>

<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="true" >

</DIColumn>

<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="true" >

</DIColumn>

<DIColumn name="guid" datatype="VARCHAR" size="255" nullable="true" >

</DIColumn>

<DIPrimaryKey>

<DIPrimaryKeyColumn name="id" />

</DIPrimaryKey>

<DITableIndex name="PK_ALLOCATION_METRIC" unique="true">

<DIIndexColumn name="id" />

</DITableIndex>

</DITable>

<DITable name="ALLOCATION_METRIC_REQUIRED_DIMS" owner="dwt" datastore="DW_DS" database="XsTarget" description="" >

<DIProperties>

<DIAttribute name="Table_Type" value="TABLE" />

<DIAttribute name="Estimated_Row_Count" value="50000" />

<DIAttribute name="Loader_Is_Template_Table" value="no" />

<DIAttribute name="Total_Number_Of_Rows_Processed" value="1" />

<DIAttribute name="Number_Of_Rows_Rejected" value="0" />

<DIAttribute name="Number_Of_Inserts" value="1" />

<DIAttribute name="Number_Of_Updates" value="0" />

<DIAttribute name="Number_Of_Deletes" value="0" />

<DIAttribute name="Elapsed_Time_For_Load" value="0 Seconds" />

<DIAttribute name="db_alias_name" value="DW_ALIAS" />

</DIProperties>

<DIColumn name="id" datatype="DECIMAL" precision="19" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="Dimension_Name" datatype="VARCHAR" size="255" nullable="false" >

</DIColumn>

<DIPrimaryKey>

<DIPrimaryKeyColumn name="id" />

</DIPrimaryKey>

<DITableIndex name="PK_ALLOCATION_METRIC_REQUIRED_DIMS" unique="true">

<DIIndexColumn name="id" />

</DITableIndex>

</DITable>

<DITable name="FEDERATED_DIM_V" owner="dwt" datastore="DW_DS" database="XsTarget" description="" >

<DIProperties>

<DIAttribute name="Table_Type" value="TABLE" />

<DIAttribute name="Estimated_Row_Count" value="50000" />

<DIAttribute name="Loader_Is_Template_Table" value="no" />

<DIAttribute name="db_alias_name" value="DW_ALIAS" />

</DIProperties>

<DIColumn name="DIMENSION_NAME" datatype="VARCHAR" size="59" nullable="false" >

</DIColumn>

<DIColumn name="DIMENSION_VALUE" datatype="VARCHAR" size="59" nullable="false" >

</DIColumn>

<DIColumn name="DIMENSION_ID" datatype="DECIMAL" precision="10" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="DIMENSION_DK" datatype="DECIMAL" precision="10" scale="0" nullable="false" >

</DIColumn>

</DITable>

<DITable name="PERIOD_DIM" owner="dwt" datastore="DW_DS" database="XsTarget" description="" >

<DIProperties>

<DIAttribute name="Table_Type" value="TABLE" />

<DIAttribute name="Estimated_Row_Count" value="50000" />

<DIAttribute name="Loader_Is_Template_Table" value="no" />

<DIAttribute name="db_alias_name" value="DW_ALIAS" />

</DIProperties>

<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="DESCRIPTION" datatype="VARCHAR" size="100" nullable="true" >

</DIColumn>

<DIColumn name="DISPLAY_LABEL" datatype="VARCHAR" size="20" nullable="true" >

</DIColumn>

<DIColumn name="END_DATE" datatype="DATETIME" nullable="false" >

</DIColumn>

<DIColumn name="FINANCIAL_USAGE_TYPE" datatype="VARCHAR" size="20" nullable="true" >

</DIColumn>

<DIColumn name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" nullable="false" >

</DIColumn>

<DIColumn name="MD_CREATEDDATE" datatype="DATETIME" nullable="false" >

</DIColumn>

<DIColumn name="MD_DELETEDDATE" datatype="DATETIME" nullable="true" >

</DIColumn>

<DIColumn name="MD_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="MD_LASTMODDATE" datatype="DATETIME" nullable="true" >

</DIColumn>

<DIColumn name="MD_TRANSENDDATE" datatype="DATETIME" nullable="true" >

</DIColumn>

<DIColumn name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" nullable="false" >

</DIColumn>

<DIColumn name="NAME" datatype="VARCHAR" size="20" nullable="true" >

</DIColumn>

<DIColumn name="PARENT_DURABLE_KEY" datatype="DECIMAL" precision="18" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="PARENT_ID" datatype="DECIMAL" precision="18" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="PERIOD_NUMBER" datatype="DECIMAL" precision="16" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="PERIODICITY" datatype="VARCHAR" size="20" nullable="false" >

</DIColumn>

<DIColumn name="PK_PERIOD_ID" datatype="DECIMAL" precision="18" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="START_DATE" datatype="DATETIME" nullable="false" >

</DIColumn>

<DIPrimaryKey>

<DIPrimaryKeyColumn name="PK_PERIOD_ID" />

</DIPrimaryKey>

<DITableIndex name="PK_PERIOD_DIM" unique="true">

<DIIndexColumn name="PK_PERIOD_ID" />

</DITableIndex>

</DITable>

<DITable name="ALLOCATION_METRIC_VALF" owner="dws" datastore="SRCSTAGING_DS" database="XsStaging" description="" >

<DIProperties>

<DIAttribute name="Table_Type" value="TABLE" />

<DIAttribute name="Estimated_Row_Count" value="50000" />

<DIAttribute name="Loader_Is_Template_Table" value="no" />

<DIAttribute name="Total_Number_Of_Rows_Processed" value="0" />

<DIAttribute name="Number_Of_Rows_Rejected" value="0" />

<DIAttribute name="Number_Of_Inserts" value="0" />

<DIAttribute name="Number_Of_Updates" value="0" />

<DIAttribute name="Number_Of_Deletes" value="0" />

<DIAttribute name="Elapsed_Time_For_Load" value="0 Seconds" />

<DIAttribute name="db_alias_name" value="SRCSTAGING_ALIAS" />

</DIProperties>

<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="METRIC_NAME" datatype="VARCHAR" size="255" nullable="true" >

</DIColumn>

<DIColumn name="METRIC_DESCRIPTION" datatype="VARCHAR" size="255" nullable="true" >

</DIColumn>

<DIColumn name="DIMENSION_NAME" datatype="VARCHAR" size="255" nullable="true" >

</DIColumn>

<DIColumn name="PERIOD_DATE_START" datatype="DATETIME" nullable="true" >

</DIColumn>

<DIColumn name="PERIOD_DATE_END" datatype="DATETIME" nullable="true" >

</DIColumn>

<DIColumn name="DIMENSION_VALUE" datatype="VARCHAR" size="255" nullable="true" >

</DIColumn>

<DIColumn name="METRIC_AMOUNT" datatype="DECIMAL" precision="12" scale="2" nullable="true" >

</DIColumn>

<DIColumn name="DI_ERRORACTION" datatype="VARCHAR" size="1" nullable="true" >

</DIColumn>

<DIColumn name="DI_ERRORCOLUMNS" datatype="VARCHAR" size="500" nullable="true" >

</DIColumn>

</DITable>

<DITable name="FILE_LOCATION_INFO" owner="dwmetadata" datastore="DW_METADATA_DS" database="XsStaging" description="" >

<DIProperties>

<DIAttribute name="Table_Type" value="TABLE" />

<DIAttribute name="Estimated_Row_Count" value="50000" />

<DIAttribute name="Loader_Is_Template_Table" value="no" />

<DIAttribute name="db_alias_name" value="DW_METADATA_ALIAS" />

</DIProperties>

<DIColumn name="ID" datatype="DECIMAL" precision="10" scale="0" nullable="false" >

</DIColumn>

<DIColumn name="SOURCE" datatype="VARCHAR" size="30" nullable="true" >

</DIColumn>

<DIColumn name="FILE_LOCATION" datatype="VARCHAR" size="200" nullable="true" >

</DIColumn>

</DITable>

<DIExcelDatastore name="METRIC_ALLOCATION_EXTN_SOURCE_XLS" typeId="3" >

<DIProperties>

<DIAttribute name="SavedAfterCheckOut" value="YES"/>

<DIAttribute name="Date_created" value="Tue Apr 13 21:24:56 2010"/>

<DIAttribute name="Date_modified" value="Mon Aug 26 11:24:10 2013"/>

</DIProperties>

<DISchema>

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="255" >

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="255" >

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="255" >

</DIElement>

<DIElement name="PERIOD_DATE_START" datatype="DATE" >

</DIElement>

<DIElement name="PERIOD_DATE_END" datatype="DATE" >

</DIElement>

<DIElement name="DIMENSION_VALUE" datatype="VARCHAR" size="255" >

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DOUBLE" >

</DIElement>

</DISchema>

<DIAttributes>

<DIAttribute name="MSExcel_file_dir" value="$G_EXTN_FILELOCATION"/>

<DIAttribute name="MSExcel_file_name" value="AllocationMetric.xls"/>

<DIAttribute name="MSExcel_worksheet" value="1"/>

<DIAttribute name="MSExcel_worksheet_all" value="yes"/>

<DIAttribute name="MSExcel_worksheet_is_number" value="yes"/>

<DIAttribute name="MSExcel_worksheet_use_1row_names" value="yes"/>

<DIAttribute name="locale_codepage" value="utf-8"/>

<DIAttribute name="locale_language" value="&lt;default&gt;"/>

<DIAttribute name="locale_territory" value="&lt;default&gt;"/>

</DIAttributes>

</DIExcelDatastore>

<DIScriptFunction name="ABC_ENDJB_FN" typeId="11" >

<DIUIOptions>

<DIAttribute name="ui_script_text" value="#UPDATE STEP_RUNTIME RECORD WITH SUCCESS STATUS AND END TIME&#xA;#GET JOB_ID&#xA;&#xA;$l_status = 'SUCCESS';&#xA;#$now = sysdate();&#xA;&#xA;$l_wf_failed_count = sql('DW_ABC_DS',' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')');&#xA;ETL_PRINT( '**     wf_failed_count = {$l_wf_failed_count}' );&#xA;&#xA;$l_wf_success_count = sql('DW_ABC_DS',' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                     where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'');&#xA;ETL_PRINT( '**     wf_success_count = {$l_wf_success_count}' );&#xA;&#xA;$l_am_failed_count = sql('DW_ABC_DS',' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')');&#xA;ETL_PRINT( '**     am_failed_count = {$l_am_failed_count}' );&#xA;&#xA;$l_am_warning_count = sql('DW_ABC_DS',' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'WARNING\'');&#xA;ETL_PRINT( '**     am_warning_count = {$l_am_warning_count}' );&#xA;&#xA;$l_am_success_count = sql('DW_ABC_DS',' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'');&#xA;ETL_PRINT( '**     am_success_count = {$l_am_success_count}' );&#xA;&#xA;$l_status_info = 'WFs statuses: success: ' || $l_wf_success_count || ', error: '  || $l_wf_failed_count ||' || Audit metrics: success: ' || $l_am_success_count || ', warning: ' || $l_am_warning_count || ', error: ' || $l_am_failed_count || '.';&#xA;&#xA;if ($l_wf_failed_count &gt; 0)&#xA;begin&#xA;&#x9;$l_status = 'ERROR';&#xA;&#x9;$l_reco_action =  'Drill to WF level to access the error message. ';&#xA;end&#x9;&#xA;else if ($l_am_failed_count &gt; 0)&#xA;begin&#xA;&#x9;$l_status = 'ERROR'; &#xA;&#x9;$l_reco_action = $l_reco_action || 'Refer to failed metrics. ';&#xA;end&#xA;else if ($l_am_warning_count &gt; 0)&#xA;begin&#xA;&#x9;$l_status = 'WARNING';&#xA;&#x9;$l_reco_action = $l_reco_action || 'Check WARNING metrics. ';&#xA;end&#xA;&#xA;&#xA;#sql('DW_ABC_DS','update JOB_STREAM_STEP_RT&#xA;#               set STATUS = {$l_status}, STATE = \'FINISHED\' , END_TIME = {sysdate()}, STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;#               where MD_PROCESS_ID = {$p_process_id}');&#xA;&#xA;sql('DW_ABC_DS','update JOB_STREAM_STEP_RT&#xA;               set STATUS = {$l_status}, STATE = \'FINISHED\' , END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;               where MD_PROCESS_ID = {$p_process_id}');&#xA;ETL_PRINT( '**' );&#xA;ETL_PRINT( '**' );&#xA;ETL_PRINT( '** The Job {job_name()} is ending' );&#xA;ETL_PRINT( '**   status: {$l_status}' );&#xA;ETL_PRINT( '**   explanation: {$l_status_info})' );&#xA;ETL_PRINT( '********************************' );&#xA;ETL_PRINT( '********************************' );&#xA;&#xA;return NULL;&#xA;"/>

</DIUIOptions>

<DIProperties>

<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>

</DIProperties>

<DIParameters><DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >

</DIElement>

</DIParameters>

<DIVariables><DIElement paramType="LOCAL" name="$l_wf_failed_count" datatype="INT" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_status" datatype="VARCHAR" size="10" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_wf_success_count" datatype="INT" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_status_info" datatype="VARCHAR" size="400" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_am_failed_count" datatype="INT" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_am_warning_count" datatype="INT" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_am_success_count" datatype="INT" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_reco_action" datatype="VARCHAR" size="4000" >

</DIElement>

</DIVariables>

<DIFunctionReturn datatype="INT" />

<DISteps>

<DIAssignmentStep typeId="12" variable="$l_status" >

<DIExpression isString="true" expr="'SUCCESS'" >

<CONSTANT value="SUCCESS" datatype="VARCHAR" size="7" />

</DIExpression>

</DIAssignmentStep>

<DIAssignmentStep typeId="12" variable="$l_wf_failed_count" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value=" select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = 'ERROR' or status = 'MAX_EXECUTION_TIME_EXCEEDED')" datatype="VARCHAR" size="175" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('**     wf_failed_count = {$l_wf_failed_count}')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="**     wf_failed_count = {$l_wf_failed_count}" datatype="VARCHAR" size="45" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIAssignmentStep typeId="12" variable="$l_wf_success_count" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                     where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value=" select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                     where MD_PROCESS_ID = {$p_process_id} AND status = 'SUCCESS'" datatype="VARCHAR" size="134" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('**     wf_success_count = {$l_wf_success_count}')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="**     wf_success_count = {$l_wf_success_count}" datatype="VARCHAR" size="47" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIAssignmentStep typeId="12" variable="$l_am_failed_count" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value=" select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = 'ERROR' or status = 'MAX_EXECUTION_TIME_EXCEEDED')" datatype="VARCHAR" size="162" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('**     am_failed_count = {$l_am_failed_count}')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="**     am_failed_count = {$l_am_failed_count}" datatype="VARCHAR" size="45" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIAssignmentStep typeId="12" variable="$l_am_warning_count" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'WARNING\'')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value=" select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = 'WARNING'" datatype="VARCHAR" size="120" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('**     am_warning_count = {$l_am_warning_count}')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="**     am_warning_count = {$l_am_warning_count}" datatype="VARCHAR" size="47" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIAssignmentStep typeId="12" variable="$l_am_success_count" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value=" select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = 'SUCCESS'" datatype="VARCHAR" size="120" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('**     am_success_count = {$l_am_success_count}')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="**     am_success_count = {$l_am_success_count}" datatype="VARCHAR" size="47" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIAssignmentStep typeId="12" variable="$l_status_info" >

<DIExpression isString="true" expr="(((((((((('WFs statuses: success: ' || $l_wf_success_count) || ', error: ') || $l_wf_failed_count) || ' || Audit metrics: success: ') || $l_am_success_count) || ', warning: ') || $l_am_warning_count) || ', error: ') || $l_am_failed_count) || '.')" >

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONSTANT value="WFs statuses: success: " datatype="VARCHAR" size="23" />

<VARIABLE_REFERENCE name="$l_wf_success_count" />

</CONCAT>

<CONSTANT value=", error: " datatype="VARCHAR" size="9" />

</CONCAT>

<VARIABLE_REFERENCE name="$l_wf_failed_count" />

</CONCAT>

<CONSTANT value=" || Audit metrics: success: " datatype="VARCHAR" size="28" />

</CONCAT>

<VARIABLE_REFERENCE name="$l_am_success_count" />

</CONCAT>

<CONSTANT value=", warning: " datatype="VARCHAR" size="11" />

</CONCAT>

<VARIABLE_REFERENCE name="$l_am_warning_count" />

</CONCAT>

<CONSTANT value=", error: " datatype="VARCHAR" size="9" />

</CONCAT>

<VARIABLE_REFERENCE name="$l_am_failed_count" />

</CONCAT>

<CONSTANT value="." datatype="VARCHAR" size="1" />

</CONCAT>

</DIExpression>

</DIAssignmentStep>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($l_wf_failed_count &gt; 0)" >

<LOGICAL_OP op="GT">

<VARIABLE_REFERENCE name="$l_wf_failed_count" />

<CONSTANT value="0" datatype="INT" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIAssignmentStep typeId="12" variable="$l_status" >

<DIExpression isString="true" expr="'ERROR'" >

<CONSTANT value="ERROR" datatype="VARCHAR" size="5" />

</DIExpression>

</DIAssignmentStep>

<DIAssignmentStep typeId="12" variable="$l_reco_action" >

<DIExpression isString="true" expr="'Drill to WF level to access the error message. '" >

<CONSTANT value="Drill to WF level to access the error message. " datatype="VARCHAR" size="47" />

</DIExpression>

</DIAssignmentStep>

</DIIf>

<DIElse>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($l_am_failed_count &gt; 0)" >

<LOGICAL_OP op="GT">

<VARIABLE_REFERENCE name="$l_am_failed_count" />

<CONSTANT value="0" datatype="INT" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIAssignmentStep typeId="12" variable="$l_status" >

<DIExpression isString="true" expr="'ERROR'" >

<CONSTANT value="ERROR" datatype="VARCHAR" size="5" />

</DIExpression>

</DIAssignmentStep>

<DIAssignmentStep typeId="12" variable="$l_reco_action" >

<DIExpression isString="true" expr="($l_reco_action || 'Refer to failed metrics. ')" >

<CONCAT>

<VARIABLE_REFERENCE name="$l_reco_action" />

<CONSTANT value="Refer to failed metrics. " datatype="VARCHAR" size="25" />

</CONCAT>

</DIExpression>

</DIAssignmentStep>

</DIIf>

<DIElse>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($l_am_warning_count &gt; 0)" >

<LOGICAL_OP op="GT">

<VARIABLE_REFERENCE name="$l_am_warning_count" />

<CONSTANT value="0" datatype="INT" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIAssignmentStep typeId="12" variable="$l_status" >

<DIExpression isString="true" expr="'WARNING'" >

<CONSTANT value="WARNING" datatype="VARCHAR" size="7" />

</DIExpression>

</DIAssignmentStep>

<DIAssignmentStep typeId="12" variable="$l_reco_action" >

<DIExpression isString="true" expr="($l_reco_action || 'Check WARNING metrics. ')" >

<CONCAT>

<VARIABLE_REFERENCE name="$l_reco_action" />

<CONSTANT value="Check WARNING metrics. " datatype="VARCHAR" size="23" />

</CONCAT>

</DIExpression>

</DIAssignmentStep>

</DIIf>

</DIIfStep>

</DIElse>

</DIIfStep>

</DIElse>

</DIIfStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT&#xA;               set STATUS = {$l_status}, STATE = \'FINISHED\' , END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;               where MD_PROCESS_ID = {$p_process_id}')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="update JOB_STREAM_STEP_RT&#xA;               set STATUS = {$l_status}, STATE = 'FINISHED' , END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;               where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="272" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('**')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="**" datatype="VARCHAR" size="2" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('**')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="**" datatype="VARCHAR" size="2" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('** The Job {job_name()} is ending')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="** The Job {job_name()} is ending" datatype="VARCHAR" size="33" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('**   status: {$l_status}')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="**   status: {$l_status}" datatype="VARCHAR" size="24" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('**   explanation: {$l_status_info})')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="**   explanation: {$l_status_info})" datatype="VARCHAR" size="35" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="********************************" datatype="VARCHAR" size="32" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="********************************" datatype="VARCHAR" size="32" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIReturnStep typeId="30" >

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

</DIReturnStep>

</DISteps>

</DIScriptFunction>

<DIScriptFunction name="ABC_ENDWF_FN" typeId="11" >

<DIUIOptions>

<DIAttribute name="ui_script_text" value="&#xA;# LOOP THROUGH ALL VALUES IN INPUT PARAMETER TARGET_TABLE FIELD&#xA;# UPDATE EACH VALUE (IN DELIMITED STRING) AS SINGLE RECORD WITH ENDDATE&#xA;# CHECK THAT ABC_ENDWF_FN CANNOT BE CALLED BEFORE ABC_STARTWF_FN&#xA;&#xA;$l_previous_status = sql('DW_ABC_DS','select STATUS from JOB_STREAM_STEP_DETAIL_RT&#xA;                                      where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ');&#xA;&#xA;if ($l_previous_status is null)&#xA;#  sql('DW_ABC_DS','insert into JOB_STREAM_STEP_DETAIL_RT &#xA;#                   (MD_PROCESS_ID, DETAIL_NAME, STATUS, END_TIME)  &#xA;#                   VALUES ({$p_process_id}, {$p_detailname}, \'ERROR\', {sysdate()})');&#x9;&#xD;&#xA;  sql('DW_ABC_DS','insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                   (MD_PROCESS_ID, DETAIL_NAME, STATUS, END_TIME)  &#xA;                   VALUES ({$p_process_id}, {$p_detailname}, \'ERROR\', convert(datetime,{sysdate()},111))');&#x9;&#xA;else&#xA;  begin&#xA;    if ($l_previous_status = 'RUNNING')&#xA;      sql('DW_ABC_DS','update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = \'SUCCESS\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ');&#xA;&#x9;else&#xA;      sql('DW_ABC_DS','update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = \'ERROR\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ');&#xA;&#x9;&#xA;  end&#xA;&#xA;ETL_PRINT( '        ** The workflow: [workflow_name()] is ending' );&#xA;ETL_PRINT( '        **   user: ' || system_user_name() );&#xA;ETL_PRINT( '        **   detail name: ' || $p_detailname );&#xA;ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ********************************' );&#xA;&#xA;return NULL;&#xA;&#xA;&#xA;&#xA;&#xA;  "/>

</DIUIOptions>

<DIProperties>

<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>

</DIProperties>

<DIParameters><DIElement paramType="IN" name="$p_detailname" datatype="VARCHAR" size="100" >

</DIElement>

<DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >

</DIElement>

</DIParameters>

<DIVariables><DIElement paramType="LOCAL" name="$l_previous_status" datatype="VARCHAR" size="12" >

</DIElement>

</DIVariables>

<DIFunctionReturn datatype="INT" />

<DISteps>

<DIAssignmentStep typeId="12" variable="$l_previous_status" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'select STATUS from JOB_STREAM_STEP_DETAIL_RT&#xA;                                      where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="select STATUS from JOB_STREAM_STEP_DETAIL_RT&#xA;                                      where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} " datatype="VARCHAR" size="155" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($l_previous_status IS  NULL )" >

<LOGICAL_OP op="IS NULL">

<VARIABLE_REFERENCE name="$l_previous_status" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                   (MD_PROCESS_ID, DETAIL_NAME, STATUS, END_TIME)  &#xA;                   VALUES ({$p_process_id}, {$p_detailname}, \'ERROR\', convert(datetime,{sysdate()},111))')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                   (MD_PROCESS_ID, DETAIL_NAME, STATUS, END_TIME)  &#xA;                   VALUES ({$p_process_id}, {$p_detailname}, 'ERROR', convert(datetime,{sysdate()},111))" datatype="VARCHAR" size="211" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIIf>

<DIElse>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($l_previous_status = 'RUNNING')" >

<LOGICAL_OP op="EQ">

<VARIABLE_REFERENCE name="$l_previous_status" />

<CONSTANT value="RUNNING" datatype="VARCHAR" size="7" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = \'SUCCESS\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = 'SUCCESS', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} " datatype="VARCHAR" size="243" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIIf>

<DIElse>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = \'ERROR\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="update JOB_STREAM_STEP_DETAIL_RT&#xA;                       set STATUS = 'ERROR', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                       where MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} " datatype="VARCHAR" size="241" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIElse>

</DIIfStep>

</DIElse>

</DIIfStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ** The workflow: [workflow_name()] is ending')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ** The workflow: [workflow_name()] is ending" datatype="VARCHAR" size="52" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('        **   user: ' || system_user_name()))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="        **   user: " datatype="VARCHAR" size="19" />

<FUNCTION_CALL name="system_user_name"  type="DI" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('        **   detail name: ' || $p_detailname))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="        **   detail name: " datatype="VARCHAR" size="26" />

<VARIABLE_REFERENCE name="$p_detailname" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIReturnStep typeId="30" >

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

</DIReturnStep>

</DISteps>

</DIScriptFunction>

<DIScriptFunction name="ABC_FAILJB_FN" typeId="11" >

<DIUIOptions>

<DIAttribute name="ui_script_text" value="# IN EVENT THE JOB FAILED, UPDATE JOB RECORD WITH FAIL STATUS&#xA;&#xA;&#xA;if ($p_process_id is null)&#xA;  begin&#xA; &#x9; ETL_PRINT( 'ENTERED THE JOB CATCH BEFORE THE PROCESS_ID COULD BE SET (debug mode specific error)' );&#xA; &#x9; ETL_PRINT( 'AN ERROR RAISED BEFORE the execution of the job start script (this exception will not be recorded by ABC infrastructure)' );&#xA;  end&#xA;else&#xA;  begin&#xA;&#x9; $l_status_text = replace_substr( $p_status_info, '\'','\'\'');&#xA; &#x9; sql('DW_ABC_DS','update JOB_STREAM_STEP_RT&#xA;                 set STATE = \'FINISHED\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}&#xA;                 where  MD_PROCESS_ID = {$p_process_id} ');&#xA;&#xA;  end&#xA;&#xA;&#xA;ETL_PRINT( '        ** The Job : [job_name()] FAILED' );&#xA;ETL_PRINT( '        **   user: ' || system_user_name() );&#xA;ETL_PRINT( '        **   status info: ' || $p_status_info );&#xA;ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ********************************' );&#xA;&#xA;return NULL;&#xA;"/>

</DIUIOptions>

<DIProperties>

<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>

<DIAttribute name="Parallelizable" value="no"/>

<DIAttribute name="isScriptValidationFunction" value="no"/>

</DIProperties>

<DIParameters><DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >

</DIElement>

<DIElement paramType="IN" name="$p_status_info" datatype="VARCHAR" size="400" >

</DIElement>

</DIParameters>

<DIVariables><DIElement paramType="LOCAL" name="$l_status_text" datatype="VARCHAR" size="400" >

</DIElement>

</DIVariables>

<DIFunctionReturn datatype="INT" />

<DISteps>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($p_process_id IS  NULL )" >

<LOGICAL_OP op="IS NULL">

<VARIABLE_REFERENCE name="$p_process_id" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('ENTERED THE JOB CATCH BEFORE THE PROCESS_ID COULD BE SET (debug mode specific error)')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="ENTERED THE JOB CATCH BEFORE THE PROCESS_ID COULD BE SET (debug mode specific error)" datatype="VARCHAR" size="84" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('AN ERROR RAISED BEFORE the execution of the job start script (this exception will not be recorded by ABC infrastructure)')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="AN ERROR RAISED BEFORE the execution of the job start script (this exception will not be recorded by ABC infrastructure)" datatype="VARCHAR" size="120" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIIf>

<DIElse>

<DIAssignmentStep typeId="12" variable="$l_status_text" >

<DIExpression isString="true" expr="replace_substr($p_status_info, '\'', '\'\'')" >

<FUNCTION_CALL name="replace_substr"  type="DI" >

<VARIABLE_REFERENCE name="$p_status_info" />

<CONSTANT value="'" datatype="VARCHAR" size="1" />

<CONSTANT value="''" datatype="VARCHAR" size="2" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT&#xA;                 set STATE = \'FINISHED\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}&#xA;                 where  MD_PROCESS_ID = {$p_process_id} ')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="update JOB_STREAM_STEP_RT&#xA;                 set STATE = 'FINISHED', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS = 'ERROR', STATUS_INFO = {$l_status_text}&#xA;                 where  MD_PROCESS_ID = {$p_process_id} " datatype="VARCHAR" size="241" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIElse>

</DIIfStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ** The Job : [job_name()] FAILED')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ** The Job : [job_name()] FAILED" datatype="VARCHAR" size="40" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('        **   user: ' || system_user_name()))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="        **   user: " datatype="VARCHAR" size="19" />

<FUNCTION_CALL name="system_user_name"  type="DI" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('        **   status info: ' || $p_status_info))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="        **   status info: " datatype="VARCHAR" size="26" />

<VARIABLE_REFERENCE name="$p_status_info" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIReturnStep typeId="30" >

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

</DIReturnStep>

</DISteps>

</DIScriptFunction>

<DIScriptFunction name="ABC_FAILWF_FN" typeId="11" >

<DIUIOptions>

<DIAttribute name="ui_script_text" value="# IN EVENT THE WORKFLOW FAILED, UPDATE WORKFLOW RECORD WITH FAIL STATUS&#xA;&#xA;$l_status_text = replace_substr( $p_status_info, '\'','\'\'');&#xA;&#xA;sql('DW_ABC_DS','update JOB_STREAM_STEP_DETAIL_RT&#xA;                 set STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}, END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                 where  MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ');&#xA;&#xA;ETL_PRINT( '        ** The workflow: [workflow_name()] FAILED' );&#xA;ETL_PRINT( '        **   user: ' || system_user_name() );&#xA;ETL_PRINT( '        **   status info: ' || $p_status_info );&#xA;ETL_PRINT( '        **   detail name: ' || $p_detailname );&#xA;ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ********************************' );&#xA;&#xA;return NULL;&#xA;"/>

</DIUIOptions>

<DIProperties>

<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>

</DIProperties>

<DIParameters><DIElement paramType="IN" name="$p_detailname" datatype="VARCHAR" size="100" >

</DIElement>

<DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >

</DIElement>

<DIElement paramType="IN" name="$p_status_info" datatype="VARCHAR" size="400" >

</DIElement>

</DIParameters>

<DIVariables><DIElement paramType="LOCAL" name="$l_status_text" datatype="VARCHAR" size="400" >

</DIElement>

</DIVariables>

<DIFunctionReturn datatype="INT" />

<DISteps>

<DIAssignmentStep typeId="12" variable="$l_status_text" >

<DIExpression isString="true" expr="replace_substr($p_status_info, '\'', '\'\'')" >

<FUNCTION_CALL name="replace_substr"  type="DI" >

<VARIABLE_REFERENCE name="$p_status_info" />

<CONSTANT value="'" datatype="VARCHAR" size="1" />

<CONSTANT value="''" datatype="VARCHAR" size="2" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_DETAIL_RT&#xA;                 set STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}, END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                 where  MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="update JOB_STREAM_STEP_DETAIL_RT&#xA;                 set STATUS = 'ERROR', STATUS_INFO = {$l_status_text}, END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                 where  MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} " datatype="VARCHAR" size="262" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ** The workflow: [workflow_name()] FAILED')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ** The workflow: [workflow_name()] FAILED" datatype="VARCHAR" size="49" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('        **   user: ' || system_user_name()))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="        **   user: " datatype="VARCHAR" size="19" />

<FUNCTION_CALL name="system_user_name"  type="DI" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('        **   status info: ' || $p_status_info))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="        **   status info: " datatype="VARCHAR" size="26" />

<VARIABLE_REFERENCE name="$p_status_info" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('        **   detail name: ' || $p_detailname))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="        **   detail name: " datatype="VARCHAR" size="26" />

<VARIABLE_REFERENCE name="$p_detailname" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIReturnStep typeId="30" >

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

</DIReturnStep>

</DISteps>

</DIScriptFunction>

<DIScriptFunction name="ABC_STARTJB_FN" typeId="11" >

<DIUIOptions>

<DIAttribute name="ui_script_text" value="#$l_job_start_date = sysdate( );&#xD;&#xA;$l_job_start_date = sql('DW_ABC_DS','select getdate()');&#xD;&#xA;$l_job_start_date_vchar = sql('DW_ABC_DS','select convert(varchar(25),convert(datetime,{$l_job_start_date},111),127)');&#xD;&#xA;ETL_PRINT('l_job_start_date_vchar = '|| $l_job_start_date_vchar);&#xD;&#xA;#sql('DW_ABC_DS','select convert(datetime,GETDATE()-5,111)');&#xD;&#xA;#;&#xA;# the job may have been called from the DW scheduler as part of a job stream&#xA;# or it may be launched manually &#xA;# if the job is called as part of a job stream&#xA;#   then its row in DW_ABC_DS.STEP_RUNTIME identified by $G_STEP_RT_ID  has already &#xA;#   been created with a WAITING status&#xA;# else&#xA;#   the job has been launched out of a stream context, it will create its own entry &#xA;#   flagged as MANUAL in DW_ABC_DS.STEP_RUNTIME&#xA;       &#xA;if ($p_debug_mode is null or not $p_debug_mode = 1)&#xA;  begin&#xA;    if ($p_process_id is null)&#xA;      begin&#xA;&#x9;    ETL_PRINT( 'ERROR: $G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1' );&#xA;        raise_exception('$G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1');&#xA;      end&#xA;    # retrieve the batch id from the STEP_RUNTIME table&#xA;    $p_batch_id = sql('DW_ABC_DS',&#xA;      'SELECT MD_BATCH_ID FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}');&#xA;    if ($p_batch_id is null)&#xA;      begin&#xA;&#x9;    ETL_PRINT( 'ERROR: Process ' || $p_process_id || ' not found in STEP_RUNTIME table.' );&#xA;        raise_exception('process '||$p_process_id||' is not found in STEP_RUNTIME table.');&#xA;      end&#xA;  end&#xA;else&#xA;  begin&#xA;    if ($p_process_id is not null)&#xA;      begin&#xA;&#x9;    ETL_PRINT( 'ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode || ' but $G_PROCESS_ID is not null (set to '||$p_process_id||'). In debug mode Process ID will be allocated by the job and cannot be specified');&#xA;        raise_exception('ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode || ' but $G_PROCESS_ID is not null (set to '||$p_process_id||'). in debug mode Process ID will be allocated by the system and cannot be specified');&#xA;      end&#xA;    # create the job level row in DW_ABC_DS.STEP_RUNTIME note that only a basic row without start dates is created &#xA;  &#x9;# this will be done in code shared for scheduled and manual rows&#xA;&#xD;&#xA;#    sql('DW_ABC_DS','insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;#                     VALUES ({job_name()},{$l_job_start_date}, \'MANUAL\', \'STARTING\')');&#xA;&#xD;&#xA;    sql('DW_ABC_DS','insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;                     VALUES ({job_name()},{$l_job_start_date_vchar}, \'MANUAL\', \'STARTING\')');&#xA;  &#x9;# retrieve the row ID affected by the DB, this ID will be used for any future reference to the STEP_RUNTIME table&#xA;# &#x9;$p_process_id = sql('DW_ABC_DS','SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date} AND STEP_OWNER = \'MANUAL\' AND STATE =  \'STARTING\' ');&#xA;#&#x9;ETL_PRINT( 'After manual launch, the assigned Process ID is: ' || $p_process_id );&#xA;&#xD;&#xA; &#x9;$p_process_id = sql('DW_ABC_DS','SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date_vchar} AND STEP_OWNER = \'MANUAL\' AND STATE =  \'STARTING\' ');&#xA;&#x9;ETL_PRINT( 'After manual launch, the assigned Process ID is: ' || $p_process_id );&#xA;&#x9;# No new batch is created in debug mode, but set 0 to batch-id variable to have a not null value&#xA;&#x9;$p_batch_id = 0;&#xA;  end&#xA;&#xA;&#xA;ETL_PRINT ( 'Process ' || $p_process_id || ' retrieved $p_batch_id = {$p_batch_id}' );&#xA;$l_state = sql('DW_ABC_DS',&#xA;      'SELECT STATE FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}');&#xA;$l_job_name = sql('DW_ABC_DS',&#xA;      'SELECT JOB_NAME FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}');&#xA;&#xA;if ($l_state != 'STARTING' )&#xA;begin&#xA;    sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATUS_INFO = \'Tried to run job, but it is not in a runnable state.\' &#xA;         where MD_PROCESS_ID = {$p_process_id}');&#xA;    raise_exception('ERROR: This job is not in a runnable state. This may come from Web Service timeout, the job will not execute and a new one will be trigered by ABC (if not already done)');&#xA;end&#xA;&#xA;if ($l_job_name != job_name() )&#xA;begin&#xA;   # sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATUS_INFO = \'This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run ($l_job_name).\' &#xA;   #      where MD_PROCESS_ID = {$p_process_id}');&#xA;    raise_exception('ERROR: This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run (' || $l_job_name || ').');&#xA;end&#xA;&#xA;# now flag the job as running&#xD;&#xA;#sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATE = \'RUNNING\',&#xA;#JOB_NAME = {job_name()}, START_TIME = convert(datetime,{$l_job_start_date},111)&#xA;#where MD_PROCESS_ID = {$p_process_id}');&#xA;sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATE = \'RUNNING\',&#xA;JOB_NAME = {job_name()}, START_TIME = {$l_job_start_date_vchar}&#xA;where MD_PROCESS_ID = {$p_process_id}');&#xA;&#xA;set_env( 'ETL_DEBUG_MODE', $p_debug_mode );&#xA;set_env( 'ETL_BATCH_ID', $p_batch_id);&#xA;set_env( 'ETL_PROCESS_ID', $p_process_id );&#xA;if ( is_set_env( 'ETL_TRACE_LEVEL' ) != 1 )&#xA;begin&#xA;&#x9;set_env( 'ETL_TRACE_LEVEL', 'ALL' );&#xA;end&#xA;&#xA;ETL_PRINT( '********************************' );&#xA;ETL_PRINT( '********************************' );&#xA;ETL_PRINT( '** The Job {job_name()} is starting' || ifthenelse((get_env('ETL_DEBUG_MODE') = '1'), ' in Debug mode', '') || '.');&#xA;ETL_PRINT( '**' );&#xA;ETL_PRINT( '**' );&#xA;&#xA;return (5);&#xA;"/>

</DIUIOptions>

<DIProperties>

<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>

</DIProperties>

<DIParameters><DIElement paramType="IN_OUT" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >

</DIElement>

<DIElement paramType="IN" name="$p_debug_mode" datatype="INT" >

</DIElement>

<DIElement paramType="OUT" name="$p_batch_id" datatype="DECIMAL" precision="19" scale="0" >

</DIElement>

</DIParameters>

<DIVariables><DIElement paramType="LOCAL" name="$l_previous_process_id" datatype="DECIMAL" precision="19" scale="0" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_sqltext" datatype="VARCHAR" size="80" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_job_start_date" datatype="DATETIME" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_state" datatype="VARCHAR" size="30" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_job_name" datatype="VARCHAR" size="60" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_job_start_date_vchar" datatype="VARCHAR" size="25" >

</DIElement>

</DIVariables>

<DIFunctionReturn datatype="DATETIME" />

<DISteps>

<DIAssignmentStep typeId="12" variable="$l_job_start_date" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'select getdate()')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="select getdate()" datatype="VARCHAR" size="16" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIAssignmentStep typeId="12" variable="$l_job_start_date_vchar" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'select convert(varchar(25),convert(datetime,{$l_job_start_date},111),127)')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="select convert(varchar(25),convert(datetime,{$l_job_start_date},111),127)" datatype="VARCHAR" size="73" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('l_job_start_date_vchar = ' || $l_job_start_date_vchar))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="l_job_start_date_vchar = " datatype="VARCHAR" size="25" />

<VARIABLE_REFERENCE name="$l_job_start_date_vchar" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="(($p_debug_mode IS  NULL ) OR&#xA;   ( not ($p_debug_mode = 1)))" >

<LOGICAL_OP op="OR">

<LOGICAL_OP op="IS NULL">

<VARIABLE_REFERENCE name="$p_debug_mode" />

</LOGICAL_OP>

<LOGICAL_OP op="NOT">

<LOGICAL_OP op="EQ">

<VARIABLE_REFERENCE name="$p_debug_mode" />

<CONSTANT value="1" datatype="INT" />

</LOGICAL_OP>

</LOGICAL_OP>

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($p_process_id IS  NULL )" >

<LOGICAL_OP op="IS NULL">

<VARIABLE_REFERENCE name="$p_process_id" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('ERROR: $G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="ERROR: $G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1" datatype="VARCHAR" size="98" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="raise_exception('$G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1')" >

<FUNCTION_CALL name="raise_exception"  type="DI" >

<CONSTANT value="$G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1" datatype="VARCHAR" size="91" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIIf>

</DIIfStep>

<DIAssignmentStep typeId="12" variable="$p_batch_id" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT MD_BATCH_ID FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="SELECT MD_BATCH_ID FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="80" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($p_batch_id IS  NULL )" >

<LOGICAL_OP op="IS NULL">

<VARIABLE_REFERENCE name="$p_batch_id" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print((('ERROR: Process ' || $p_process_id) || ' not found in STEP_RUNTIME table.'))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONCAT>

<CONSTANT value="ERROR: Process " datatype="VARCHAR" size="15" />

<VARIABLE_REFERENCE name="$p_process_id" />

</CONCAT>

<CONSTANT value=" not found in STEP_RUNTIME table." datatype="VARCHAR" size="33" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="raise_exception((('process ' || $p_process_id) || ' is not found in STEP_RUNTIME table.'))" >

<FUNCTION_CALL name="raise_exception"  type="DI" >

<CONCAT>

<CONCAT>

<CONSTANT value="process " datatype="VARCHAR" size="8" />

<VARIABLE_REFERENCE name="$p_process_id" />

</CONCAT>

<CONSTANT value=" is not found in STEP_RUNTIME table." datatype="VARCHAR" size="36" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIIf>

</DIIfStep>

</DIIf>

<DIElse>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($p_process_id IS NOT  NULL )" >

<LOGICAL_OP op="IS NOT NULL">

<VARIABLE_REFERENCE name="$p_process_id" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print((((('ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode) || ' but $G_PROCESS_ID is not null (set to ') || $p_process_id) || '). In debug mode Process ID will be allocated by the job and cannot be specified'))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONSTANT value="ERROR: abC usage error detected : $G_DEBUG_MODE is set to " datatype="VARCHAR" size="58" />

<VARIABLE_REFERENCE name="$p_debug_mode" />

</CONCAT>

<CONSTANT value=" but $G_PROCESS_ID is not null (set to " datatype="VARCHAR" size="39" />

</CONCAT>

<VARIABLE_REFERENCE name="$p_process_id" />

</CONCAT>

<CONSTANT value="). In debug mode Process ID will be allocated by the job and cannot be specified" datatype="VARCHAR" size="80" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="raise_exception((((('ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode) || ' but $G_PROCESS_ID is not null (set to ') || $p_process_id) || '). in debug mode Process ID will be allocated by the system and cannot be specified'))" >

<FUNCTION_CALL name="raise_exception"  type="DI" >

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONSTANT value="ERROR: abC usage error detected : $G_DEBUG_MODE is set to " datatype="VARCHAR" size="58" />

<VARIABLE_REFERENCE name="$p_debug_mode" />

</CONCAT>

<CONSTANT value=" but $G_PROCESS_ID is not null (set to " datatype="VARCHAR" size="39" />

</CONCAT>

<VARIABLE_REFERENCE name="$p_process_id" />

</CONCAT>

<CONSTANT value="). in debug mode Process ID will be allocated by the system and cannot be specified" datatype="VARCHAR" size="83" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIIf>

</DIIfStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;                     VALUES ({job_name()},{$l_job_start_date_vchar}, \'MANUAL\', \'STARTING\')')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;                     VALUES ({job_name()},{$l_job_start_date_vchar}, 'MANUAL', 'STARTING')" datatype="VARCHAR" size="164" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIAssignmentStep typeId="12" variable="$p_process_id" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date_vchar} AND STEP_OWNER = \'MANUAL\' AND STATE =  \'STARTING\' ')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date_vchar} AND STEP_OWNER = 'MANUAL' AND STATE =  'STARTING' " datatype="VARCHAR" size="168" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('After manual launch, the assigned Process ID is: ' || $p_process_id))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="After manual launch, the assigned Process ID is: " datatype="VARCHAR" size="49" />

<VARIABLE_REFERENCE name="$p_process_id" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIAssignmentStep typeId="12" variable="$p_batch_id" >

<DIExpression isString="true" expr="0" >

<CONSTANT value="0" datatype="INT" />

</DIExpression>

</DIAssignmentStep>

</DIElse>

</DIIfStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print((('Process ' || $p_process_id) || ' retrieved $p_batch_id = {$p_batch_id}'))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONCAT>

<CONSTANT value="Process " datatype="VARCHAR" size="8" />

<VARIABLE_REFERENCE name="$p_process_id" />

</CONCAT>

<CONSTANT value=" retrieved $p_batch_id = {$p_batch_id}" datatype="VARCHAR" size="38" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIAssignmentStep typeId="12" variable="$l_state" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT STATE FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="SELECT STATE FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="74" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIAssignmentStep typeId="12" variable="$l_job_name" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT JOB_NAME FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="SELECT JOB_NAME FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="77" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($l_state != 'STARTING')" >

<LOGICAL_OP op="NE">

<VARIABLE_REFERENCE name="$l_state" />

<CONSTANT value="STARTING" datatype="VARCHAR" size="8" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT set STATUS_INFO = \'Tried to run job, but it is not in a runnable state.\' &#xA;         where MD_PROCESS_ID = {$p_process_id}')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="update JOB_STREAM_STEP_RT set STATUS_INFO = 'Tried to run job, but it is not in a runnable state.' &#xA;         where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="146" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="raise_exception('ERROR: This job is not in a runnable state. This may come from Web Service timeout, the job will not execute and a new one will be trigered by ABC (if not already done)')" >

<FUNCTION_CALL name="raise_exception"  type="DI" >

<CONSTANT value="ERROR: This job is not in a runnable state. This may come from Web Service timeout, the job will not execute and a new one will be trigered by ABC (if not already done)" datatype="VARCHAR" size="168" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIIf>

</DIIfStep>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($l_job_name != job_name())" >

<LOGICAL_OP op="NE">

<VARIABLE_REFERENCE name="$l_job_name" />

<FUNCTION_CALL name="job_name"  type="DI" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="raise_exception((('ERROR: This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run (' || $l_job_name) || ').'))" >

<FUNCTION_CALL name="raise_exception"  type="DI" >

<CONCAT>

<CONCAT>

<CONSTANT value="ERROR: This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run (" datatype="VARCHAR" size="94" />

<VARIABLE_REFERENCE name="$l_job_name" />

</CONCAT>

<CONSTANT value=")." datatype="VARCHAR" size="2" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIIf>

</DIIfStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT set STATE = \'RUNNING\',&#xA;JOB_NAME = {job_name()}, START_TIME = {$l_job_start_date_vchar}&#xA;where MD_PROCESS_ID = {$p_process_id}')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="update JOB_STREAM_STEP_RT set STATE = 'RUNNING',&#xA;JOB_NAME = {job_name()}, START_TIME = {$l_job_start_date_vchar}&#xA;where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="150" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="set_env('ETL_DEBUG_MODE', $p_debug_mode)" >

<FUNCTION_CALL name="set_env"  type="DI" >

<CONSTANT value="ETL_DEBUG_MODE" datatype="VARCHAR" size="14" />

<VARIABLE_REFERENCE name="$p_debug_mode" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="set_env('ETL_BATCH_ID', $p_batch_id)" >

<FUNCTION_CALL name="set_env"  type="DI" >

<CONSTANT value="ETL_BATCH_ID" datatype="VARCHAR" size="12" />

<VARIABLE_REFERENCE name="$p_batch_id" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="set_env('ETL_PROCESS_ID', $p_process_id)" >

<FUNCTION_CALL name="set_env"  type="DI" >

<CONSTANT value="ETL_PROCESS_ID" datatype="VARCHAR" size="14" />

<VARIABLE_REFERENCE name="$p_process_id" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="(is_set_env('ETL_TRACE_LEVEL') != 1)" >

<LOGICAL_OP op="NE">

<FUNCTION_CALL name="is_set_env"  type="DI" >

<CONSTANT value="ETL_TRACE_LEVEL" datatype="VARCHAR" size="15" />

</FUNCTION_CALL>

<CONSTANT value="1" datatype="INT" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="set_env('ETL_TRACE_LEVEL', 'ALL')" >

<FUNCTION_CALL name="set_env"  type="DI" >

<CONSTANT value="ETL_TRACE_LEVEL" datatype="VARCHAR" size="15" />

<CONSTANT value="ALL" datatype="VARCHAR" size="3" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIIf>

</DIIfStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="********************************" datatype="VARCHAR" size="32" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="********************************" datatype="VARCHAR" size="32" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print((('** The Job {job_name()} is starting' || ifthenelse((get_env('ETL_DEBUG_MODE') = '1'), ' in Debug mode', '')) || '.'))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONCAT>

<CONSTANT value="** The Job {job_name()} is starting" datatype="VARCHAR" size="35" />

<FUNCTION_CALL name="ifthenelse"  type="DI" >

<LOGICAL_OP op="EQ">

<FUNCTION_CALL name="get_env"  type="DI" >

<CONSTANT value="ETL_DEBUG_MODE" datatype="VARCHAR" size="14" />

</FUNCTION_CALL>

<CONSTANT value="1" datatype="VARCHAR" size="1" />

</LOGICAL_OP>

<CONSTANT value=" in Debug mode" datatype="VARCHAR" size="14" />

<CONSTANT value="" datatype="VARCHAR" size="0" />

</FUNCTION_CALL>

</CONCAT>

<CONSTANT value="." datatype="VARCHAR" size="1" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('**')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="**" datatype="VARCHAR" size="2" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('**')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="**" datatype="VARCHAR" size="2" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIReturnStep typeId="30" >

<DIExpression isString="true" expr="5" >

<CONSTANT value="5" datatype="INT" />

</DIExpression>

</DIReturnStep>

</DISteps>

</DIScriptFunction>

<DIScriptFunction name="ABC_STARTWF_FN" typeId="11" >

<DIUIOptions>

<DIAttribute name="ui_script_text" value="ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ** The workflow [workflow_name()] is starting' );&#xA;ETL_PRINT( '        **   user: ' || system_user_name() );&#xA;ETL_PRINT( '        **   detail name: ' || $p_detailname );&#xA;&#xA;# DELETE EXISTING WORKFLOW RECORD&#xA;#sql('DW_ABC_DS','delete from RDS_DBA.WFEXECUTION_DW&#xA;#where APPNAME = {$p_appname} AND JOBNAME = {job_name()} AND WFNAME = {workflow_name()}&#xA;#AND TARGET_TABLE = {$l_single_tablename}');&#xA;&#xA;# GET MAX_ID FROM THE WFEXECUTION_DW TABLE&#xA;#$job_ maxkey = sql('DW_ABC_DS', 'SELECT MAX(JOB_ID) FROM RDS_DBA.ETLSYNC_DW');&#xA;#$maxkey = $maxkey + 1;&#xA;&#xA;# INSERT WORKFLOW RECORD&#x9;&#x9;&#xD;&#xA;&#xA;#$l_stepdetail_id = sql('DW_ABC_DS','insert into JOB_STREAM_STEP_DETAIL_RT &#xA;#                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;#                VALUES ({$p_process_id}, {$p_detailname}, \'RUNNING\', {sysdate()});&#xA;#&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID');&#xA;$l_stepdetail_id = sql('DW_ABC_DS','insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;                VALUES ({$p_process_id}, {$p_detailname}, \'RUNNING\', convert(varchar(25),convert(datetime,getdate(),111),127));&#xA;&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID');&#x9;&#xA;&#xA;set_env(workflow_name(), $l_stepdetail_id);&#xA;&#xA;# print('single_tablename = ' || $l_single_tablename);&#x9;   &#x9;&#xA;&#xA;return null;&#xA;"/>

</DIUIOptions>

<DIProperties>

<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>

</DIProperties>

<DIParameters><DIElement paramType="IN" name="$p_detailname" datatype="VARCHAR" size="100" >

</DIElement>

<DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >

</DIElement>

</DIParameters>

<DIVariables><DIElement paramType="LOCAL" name="$l_stepdetail_id" datatype="DECIMAL" precision="19" scale="0" >

</DIElement>

</DIVariables>

<DIFunctionReturn datatype="INT" />

<DISteps>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ********************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('        ** The workflow [workflow_name()] is starting')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="        ** The workflow [workflow_name()] is starting" datatype="VARCHAR" size="53" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('        **   user: ' || system_user_name()))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="        **   user: " datatype="VARCHAR" size="19" />

<FUNCTION_CALL name="system_user_name"  type="DI" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('        **   detail name: ' || $p_detailname))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="        **   detail name: " datatype="VARCHAR" size="26" />

<VARIABLE_REFERENCE name="$p_detailname" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIAssignmentStep typeId="12" variable="$l_stepdetail_id" >

<DIExpression isString="true" expr="sql('DW_ABC_DS', 'insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;                VALUES ({$p_process_id}, {$p_detailname}, \'RUNNING\', convert(varchar(25),convert(datetime,getdate(),111),127));&#xA;&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />

<CONSTANT value="insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;                VALUES ({$p_process_id}, {$p_detailname}, 'RUNNING', convert(varchar(25),convert(datetime,getdate(),111),127));&#xA;&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID" datatype="VARCHAR" size="280" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="set_env(workflow_name(), $l_stepdetail_id)" >

<FUNCTION_CALL name="set_env"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$l_stepdetail_id" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIReturnStep typeId="30" >

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

</DIReturnStep>

</DISteps>

</DIScriptFunction>

<DIScriptFunction name="ETL_PRINT" typeId="11" >

<DIUIOptions>

<DIAttribute name="ui_script_text" value="# 1/2 Retrieve contextual information from the environment&#xA;if ( is_set_env( 'ETL_BATCH_ID' ) = 1 )&#xA;begin&#xA;&#x9;$l_batch_id = get_env( 'ETL_BATCH_ID' );&#xA;end&#xA;else&#xA;begin&#xA;&#x9;$l_batch_id = '-';&#xA;end&#xA;&#xA;if ( is_set_env( 'ETL_PROCESS_ID' ) = 1 )&#xA;begin&#xA;&#x9;$l_process_id = get_env( 'ETL_PROCESS_ID' );&#x9;&#xA;end&#xA;else&#xA;begin&#xA;&#x9;$l_process_id = '-';&#x9;&#xA;end&#xA;&#xA;# 2/2 Really print&#xA;if ( get_env('ETL_TRACE_LEVEL') = 'ALL' )&#xA;begin&#xA;&#x9;if ( is_set_env( workflow_name() ) = 1 )&#xA;&#x9;begin&#xA;&#x9;&#x9;$l_stepdetail_id = get_env( workflow_name() );&#xA;&#x9;&#x9;print( '\[Batch:' || $l_batch_id || '\] \[Proc:' || $l_process_id || '\] \[Detail:' || $l_stepdetail_id || '\] ' || $p_MESSAGE );&#xA;&#x9;end&#xA;&#x9;else&#xA;&#x9;begin&#xA;    &#x9;print( '\[Batch:' || $l_batch_id || '\] \[Proc:' || $l_process_id || '\] ' || $p_MESSAGE );&#xA;&#x9;end&#xA;end&#xA;&#xA;return null;&#xA;"/>

</DIUIOptions>

<DIProperties>

<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>

<DIAttribute name="Description" value="This function is internal and should NOT be used by application developers.&#xA;&#xA;This function prints the parameter message to the logs with contextual information (batch id, process id) as set by the ABC_STARTJB_FN function.&#xA;&#xA;This trace file is currently the standard Data Services trace file. for instance: C:\Program Files\Business Objects\BusinessObjects Data Services\log\tracelog.txt"/>

<DIAttribute name="Parallelizable" value="no"/>

<DIAttribute name="isScriptValidationFunction" value="no"/>

</DIProperties>

<DIParameters><DIElement paramType="IN" name="$p_MESSAGE" datatype="VARCHAR" size="256" >

</DIElement>

</DIParameters>

<DIVariables><DIElement paramType="LOCAL" name="$l_batch_id" datatype="INT" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_process_id" datatype="INT" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_stepdetail_id" datatype="DECIMAL" precision="19" scale="0" >

</DIElement>

</DIVariables>

<DIFunctionReturn datatype="INT" />

<DISteps>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="(is_set_env('ETL_BATCH_ID') = 1)" >

<LOGICAL_OP op="EQ">

<FUNCTION_CALL name="is_set_env"  type="DI" >

<CONSTANT value="ETL_BATCH_ID" datatype="VARCHAR" size="12" />

</FUNCTION_CALL>

<CONSTANT value="1" datatype="INT" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIAssignmentStep typeId="12" variable="$l_batch_id" >

<DIExpression isString="true" expr="get_env('ETL_BATCH_ID')" >

<FUNCTION_CALL name="get_env"  type="DI" >

<CONSTANT value="ETL_BATCH_ID" datatype="VARCHAR" size="12" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

</DIIf>

<DIElse>

<DIAssignmentStep typeId="12" variable="$l_batch_id" >

<DIExpression isString="true" expr="'-'" >

<CONSTANT value="-" datatype="VARCHAR" size="1" />

</DIExpression>

</DIAssignmentStep>

</DIElse>

</DIIfStep>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="(is_set_env('ETL_PROCESS_ID') = 1)" >

<LOGICAL_OP op="EQ">

<FUNCTION_CALL name="is_set_env"  type="DI" >

<CONSTANT value="ETL_PROCESS_ID" datatype="VARCHAR" size="14" />

</FUNCTION_CALL>

<CONSTANT value="1" datatype="INT" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIAssignmentStep typeId="12" variable="$l_process_id" >

<DIExpression isString="true" expr="get_env('ETL_PROCESS_ID')" >

<FUNCTION_CALL name="get_env"  type="DI" >

<CONSTANT value="ETL_PROCESS_ID" datatype="VARCHAR" size="14" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

</DIIf>

<DIElse>

<DIAssignmentStep typeId="12" variable="$l_process_id" >

<DIExpression isString="true" expr="'-'" >

<CONSTANT value="-" datatype="VARCHAR" size="1" />

</DIExpression>

</DIAssignmentStep>

</DIElse>

</DIIfStep>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="(get_env('ETL_TRACE_LEVEL') = 'ALL')" >

<LOGICAL_OP op="EQ">

<FUNCTION_CALL name="get_env"  type="DI" >

<CONSTANT value="ETL_TRACE_LEVEL" datatype="VARCHAR" size="15" />

</FUNCTION_CALL>

<CONSTANT value="ALL" datatype="VARCHAR" size="3" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="(is_set_env(workflow_name()) = 1)" >

<LOGICAL_OP op="EQ">

<FUNCTION_CALL name="is_set_env"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

</FUNCTION_CALL>

<CONSTANT value="1" datatype="INT" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIAssignmentStep typeId="12" variable="$l_stepdetail_id" >

<DIExpression isString="true" expr="get_env(workflow_name())" >

<FUNCTION_CALL name="get_env"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="print(((((((('\\[Batch:' || $l_batch_id) || '\\] \\[Proc:') || $l_process_id) || '\\] \\[Detail:') || $l_stepdetail_id) || '\\] ') || $p_MESSAGE))" >

<FUNCTION_CALL name="print"  type="DI" >

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONSTANT value="\[Batch:" datatype="VARCHAR" size="8" />

<VARIABLE_REFERENCE name="$l_batch_id" />

</CONCAT>

<CONSTANT value="\] \[Proc:" datatype="VARCHAR" size="10" />

</CONCAT>

<VARIABLE_REFERENCE name="$l_process_id" />

</CONCAT>

<CONSTANT value="\] \[Detail:" datatype="VARCHAR" size="12" />

</CONCAT>

<VARIABLE_REFERENCE name="$l_stepdetail_id" />

</CONCAT>

<CONSTANT value="\] " datatype="VARCHAR" size="3" />

</CONCAT>

<VARIABLE_REFERENCE name="$p_MESSAGE" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIIf>

<DIElse>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="print(((((('\\[Batch:' || $l_batch_id) || '\\] \\[Proc:') || $l_process_id) || '\\] ') || $p_MESSAGE))" >

<FUNCTION_CALL name="print"  type="DI" >

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONCAT>

<CONSTANT value="\[Batch:" datatype="VARCHAR" size="8" />

<VARIABLE_REFERENCE name="$l_batch_id" />

</CONCAT>

<CONSTANT value="\] \[Proc:" datatype="VARCHAR" size="10" />

</CONCAT>

<VARIABLE_REFERENCE name="$l_process_id" />

</CONCAT>

<CONSTANT value="\] " datatype="VARCHAR" size="3" />

</CONCAT>

<VARIABLE_REFERENCE name="$p_MESSAGE" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIElse>

</DIIfStep>

</DIIf>

<DIElse>

</DIElse>

</DIIfStep>

<DIReturnStep typeId="30" >

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

</DIReturnStep>

</DISteps>

</DIScriptFunction>

<DIJob name="ALLOCATION_METRIC_JB" typeId="2" >

<DIProperties>

<DIAttribute name="GeneratorTemplate" value="PRODUCT_EXT_JB (version 0.13.0-SNAPSHOT)"/>

<DIAttribute name="GeneratorVersion" value="v1.0"/>

<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:50:01"/>

<DIAttribute name="Description" value="The BO DS job AM_EXT_JB is responsible for loading the AM EXT tables.  These tables are staging tables that contain validated delta data.  Data is sourced from the extracted flat files and loaded into the EXT tables.  Specific fields will be validated to make sure the data can be processed.  Not every field will be validated but the facility will exist to do so.  The following are some of the types of validations that may be performed:&#xD;&#xA;Null Business Keys&#xD;&#xA;Invalid date format&#xD;&#xA;Invalid numbers&#xD;&#xA;TBD (more use cases to identify advanced validation)&#xD;&#xA;If a record is sourced from the extract file with a null business key the record will be written to the VAL_F tables.  These tables will house all records that have validation errors that prevent the data from being processed.  Some of the format validations may have default values that allow the data to be processed.  An example of this if there is an invalid date format it may be set to a low date �??01/01/1900�?? if it is not vital for the integrity of the data."/>

<DIAttribute name="Web_Service_Enabled" value="YES"/>

</DIProperties>

<DIVariables>

<DIElement paramType="LOCAL" name="$l_allocmetric_cnt" datatype="INT" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_initial_run" datatype="VARCHAR" size="4" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_table_owner" datatype="VARCHAR" size="50" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_period_populated" datatype="VARCHAR" size="4" >

</DIElement>

<DIElement paramType="LOCAL" name="$l_period_cnt" datatype="INT" >

</DIElement>

<DIElement paramType="GLOBAL" name="$G_DEBUG_MODE" datatype="INT" >

</DIElement>

<DIElement paramType="GLOBAL" name="$G_TRACE_MODE" datatype="INT" >

</DIElement>

<DIElement paramType="GLOBAL" name="$G_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >

</DIElement>

<DIElement paramType="GLOBAL" name="$G_PROCESS_ID" datatype="DECIMAL" precision="10" scale="0" >

</DIElement>

<DIElement paramType="GLOBAL" name="$G_FLAG_DELETE" datatype="VARCHAR" size="6" >

</DIElement>

<DIElement paramType="GLOBAL" name="$G_FLAG_UPDATE" datatype="VARCHAR" size="6" >

</DIElement>

<DIElement paramType="GLOBAL" name="$G_FLAG_NEW" datatype="VARCHAR" size="6" >

</DIElement>

<DIElement paramType="GLOBAL" name="$G_EXTN_FILELOCATION" datatype="VARCHAR" size="200" >

</DIElement>

</DIVariables>

<DISteps>

<DITryStep typeId="13" >

<DIUIOptions>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_JB_TRY"/>

</DIUIOptions>

<DISteps>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="STARTJB_SC is used to set global variables and initiates the metadata tracking for the Job"/>

<DIAttribute name="ui_display_name" value="STARTJB_SC"/>

<DIAttribute name="ui_script_text" value="ABC_STARTJB_FN($G_PROCESS_ID, $G_DEBUG_MODE, $G_BATCH_ID);&#xD;&#xA;&#xD;&#xA;$G_EXTN_FILELOCATION = lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], [ FILE_LOCATION ], [ NULL ], [ SOURCE, '=', 'EXTERNAL' ]) SET(&quot;run_as_separate_process&quot; = 'no');&#xD;&#xA;&#xD;&#xA;##Ensure the dwt.PERIOD_DIM table is populated&#xD;&#xA;$l_period_cnt = sql('DW_DS','SELECT COUNT(*) FROM PERIOD_DIM');&#xD;&#xA;&#xD;&#xA;if ($l_period_cnt &gt; 2)&#xD;&#xA;  $l_period_populated = 'Y';&#xD;&#xA;else &#xD;&#xA;  $l_period_populated = 'N';&#xD;&#xA;&#xD;&#xA;##Check whether the itaapp.allocation_metric table is populated.  If it has records run an incremental workflow.  If it does&#xD;&#xA;## not have records run an initial load.&#xD;&#xA;$l_allocmetric_cnt = sql('DW_DS','SELECT COUNT(*) FROM ALLOCATION_METRIC');&#xD;&#xA;&#xD;&#xA;if ($l_allocmetric_cnt &gt; 0)&#xD;&#xA;  $l_initial_run = 'N';&#xD;&#xA;else&#xD;&#xA;  $l_initial_run = 'Y';&#xD;&#xA;&#xD;&#xA;ETL_PRINT('****************************************************************************************************************');&#xD;&#xA;ETL_PRINT(' ');&#xD;&#xA;ETL_PRINT('Initial Run is set to ' || $l_initial_run );&#xD;&#xA;ETL_PRINT(' ');&#xD;&#xA;ETL_PRINT('****************************************************************************************************************');&#xD;&#xA;&#xD;&#xA;"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_startjb_fn($G_PROCESS_ID, $G_DEBUG_MODE, $G_BATCH_ID)" >

<FUNCTION_CALL name="abc_startjb_fn"  type="DI" >

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

<VARIABLE_REFERENCE name="$G_DEBUG_MODE" />

<VARIABLE_REFERENCE name="$G_BATCH_ID" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIAssignmentStep typeId="12" variable="$G_EXTN_FILELOCATION" >

<DIExpression isString="true" expr="lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], [ FILE_LOCATION ], [  NULL  ], [ SOURCE, '=', 'EXTERNAL' ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >

<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_METADATA_DS" tableOwner="DW_METADATA_ALIAS" tableName="FILE_LOCATION_INFO" >

<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />

<CONSTANT value="MAX" datatype="VARCHAR" size="3" />

<CONSTANT value="EXTERNAL" datatype="VARCHAR" size="8" />

<CONSTANT_NULL /><DIAttributes>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIAssignmentStep typeId="12" variable="$l_period_cnt" >

<DIExpression isString="true" expr="sql('DW_DS', 'SELECT COUNT(*) FROM PERIOD_DIM')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_DS" datatype="VARCHAR" size="5" />

<CONSTANT value="SELECT COUNT(*) FROM PERIOD_DIM" datatype="VARCHAR" size="31" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($l_period_cnt &gt; 2)" >

<LOGICAL_OP op="GT">

<VARIABLE_REFERENCE name="$l_period_cnt" />

<CONSTANT value="2" datatype="INT" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIAssignmentStep typeId="12" variable="$l_period_populated" >

<DIExpression isString="true" expr="'Y'" >

<CONSTANT value="Y" datatype="VARCHAR" size="1" />

</DIExpression>

</DIAssignmentStep>

</DIIf>

<DIElse>

<DIAssignmentStep typeId="12" variable="$l_period_populated" >

<DIExpression isString="true" expr="'N'" >

<CONSTANT value="N" datatype="VARCHAR" size="1" />

</DIExpression>

</DIAssignmentStep>

</DIElse>

</DIIfStep>

<DIAssignmentStep typeId="12" variable="$l_allocmetric_cnt" >

<DIExpression isString="true" expr="sql('DW_DS', 'SELECT COUNT(*) FROM ALLOCATION_METRIC')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_DS" datatype="VARCHAR" size="5" />

<CONSTANT value="SELECT COUNT(*) FROM ALLOCATION_METRIC" datatype="VARCHAR" size="38" />

</FUNCTION_CALL>

</DIExpression>

</DIAssignmentStep>

<DIIfStep typeId="2" >

<DIExpression isString="true" expr="($l_allocmetric_cnt &gt; 0)" >

<LOGICAL_OP op="GT">

<VARIABLE_REFERENCE name="$l_allocmetric_cnt" />

<CONSTANT value="0" datatype="INT" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIAssignmentStep typeId="12" variable="$l_initial_run" >

<DIExpression isString="true" expr="'N'" >

<CONSTANT value="N" datatype="VARCHAR" size="1" />

</DIExpression>

</DIAssignmentStep>

</DIIf>

<DIElse>

<DIAssignmentStep typeId="12" variable="$l_initial_run" >

<DIExpression isString="true" expr="'Y'" >

<CONSTANT value="Y" datatype="VARCHAR" size="1" />

</DIExpression>

</DIAssignmentStep>

</DIElse>

</DIIfStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('****************************************************************************************************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="****************************************************************************************************************" datatype="VARCHAR" size="112" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(' ')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value=" " datatype="VARCHAR" size="1" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(('Initial Run is set to ' || $l_initial_run))" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONCAT>

<CONSTANT value="Initial Run is set to " datatype="VARCHAR" size="22" />

<VARIABLE_REFERENCE name="$l_initial_run" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print(' ')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value=" " datatype="VARCHAR" size="1" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('****************************************************************************************************************')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="****************************************************************************************************************" datatype="VARCHAR" size="112" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

<DIIfStep typeId="2" >

<DIUIOptions>

<DIAttribute name="If_condition" value="$l_period_populated = 'Y'"/>

<DIAttribute name="ui_display_name" value="COND_PERIOD_POPULATED"/>

</DIUIOptions>

<DIExpression isString="true" expr="($l_period_populated = 'Y')" >

<LOGICAL_OP op="EQ">

<VARIABLE_REFERENCE name="$l_period_populated" />

<CONSTANT value="Y" datatype="VARCHAR" size="1" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DIIfStep typeId="2" >

<DIUIOptions>

<DIAttribute name="If_condition" value="$l_initial_run = 'Y'"/>

<DIAttribute name="ui_display_name" value="COND_INITIAL_RUN"/>

</DIUIOptions>

<DIExpression isString="true" expr="($l_initial_run = 'Y')" >

<LOGICAL_OP op="EQ">

<VARIABLE_REFERENCE name="$l_initial_run" />

<CONSTANT value="Y" datatype="VARCHAR" size="1" />

</LOGICAL_OP>

</DIExpression>

<DIIf>

<DICallStep typeId="0"  calledObjectType="Workflow" name="ALLOCATION_METRIC_REGEN_VIEW_CONT_WF" >

</DICallStep>

<DICallStep typeId="0"  calledObjectType="Workflow" name="ALLOCATION_METRIC_INITIAL_CONT_WF" >

</DICallStep>

</DIIf>

<DIElse>

<DICallStep typeId="0"  calledObjectType="Workflow" name="ALLOCATION_METRIC_REGEN_VIEW_CONT_WF" >

</DICallStep>

<DICallStep typeId="0"  calledObjectType="Workflow" name="ALLOCATION_METRIC_DELETE_CONT_WF" >

</DICallStep>

<DICallStep typeId="0"  calledObjectType="Workflow" name="ALLOCATION_METRIC_UPDATE_CONT_WF" >

</DICallStep>

</DIElse>

</DIIfStep>

</DIIf>

<DIElse>

<DIScript>

<DIUIOptions>

<DIAttribute name="ui_display_name" value="COND_PERIOD_POPULATED_FAILURE"/>

<DIAttribute name="ui_script_text" value="ETL_PRINT('An Error has occurred: The PERIOD_DIM table within the DW Target database must');&#xD;&#xA;ETL_PRINT('                       be populated prior to running Allocation Metric ETL.');&#xD;&#xA;ETL_PRINT('                       This ensures all records don\'t fail validation checks.');                       &#xD;&#xA;&#xD;&#xA;raise_exception_ext('PERIOD_DIM table is not populated. Exiting without running ETL.',1);"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('An Error has occurred: The PERIOD_DIM table within the DW Target database must')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="An Error has occurred: The PERIOD_DIM table within the DW Target database must" datatype="VARCHAR" size="78" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('                       be populated prior to running Allocation Metric ETL.')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="                       be populated prior to running Allocation Metric ETL." datatype="VARCHAR" size="75" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="etl_print('                       This ensures all records don\'t fail validation checks.')" >

<FUNCTION_CALL name="etl_print"  type="DI" >

<CONSTANT value="                       This ensures all records don't fail validation checks." datatype="VARCHAR" size="77" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="raise_exception_ext('PERIOD_DIM table is not populated. Exiting without running ETL.', 1)" >

<FUNCTION_CALL name="raise_exception_ext"  type="DI" >

<CONSTANT value="PERIOD_DIM table is not populated. Exiting without running ETL." datatype="VARCHAR" size="63" />

<CONSTANT value="1" datatype="INT" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

</DIElse>

</DIIfStep>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="ENDJB_SC concludes the metadata for the Job and Adds final Entries into the ABC Tracking system"/>

<DIAttribute name="ui_display_name" value="ENDJB_SC"/>

<DIAttribute name="ui_script_text" value="ABC_ENDJB_FN($G_PROCESS_ID);&#xD;&#xA;"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_endjb_fn($G_PROCESS_ID)" >

<FUNCTION_CALL name="abc_endjb_fn"  type="DI" >

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

</DISteps>

<DICatch typeId="20" errorCode="210101" >

<DIUIOptions>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_JB_CATCH"/>

</DIUIOptions>

<DISteps>

<DIScript>

<DIUIOptions>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_JB_FAIL_SC"/>

<DIAttribute name="ui_script_text" value="ABC_FAILJB_FN($G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_failjb_fn($G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >

<FUNCTION_CALL name="abc_failjb_fn"  type="DI" >

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

<CONCAT>

<CONCAT>

<CONCAT>

<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />

<FUNCTION_CALL name="error_number"  type="DI" />

</CONCAT>

<CONSTANT value="\] " datatype="VARCHAR" size="3" />

</CONCAT>

<FUNCTION_CALL name="error_message"  type="DI" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

</DISteps>

</DICatch>

</DITryStep>

</DISteps>

<DIAttributes>

<DIAttribute name="job_GV_$G_FLAG_DELETE" value="'DEL'"/>

<DIAttribute name="job_GV_$G_FLAG_NEW" value="'NEW'"/>

<DIAttribute name="job_GV_$G_FLAG_UPDATE" value="'UPD'"/>

<DIAttribute name="job_checkpoint_enabled" value="no"/>

<DIAttribute name="job_collect_statistics" value="no"/>

<DIAttribute name="job_collect_statistics_monitor" value="no"/>

<DIAttribute name="job_enable_assemblers" value="yes"/>

<DIAttribute name="job_enable_audit" value="yes"/>

<DIAttribute name="job_enable_dataquality" value="yes"/>

<DIAttribute name="job_export_repo" value="no"/>

<DIAttribute name="job_export_reports" value="no"/>

<DIAttribute name="job_isrecoverable" value="no"/>

<DIAttribute name="job_mode" value="Multi-Process"/>

<DIAttribute name="job_monitor_sample_rate" value="1000"/>

<DIAttribute name="job_name" value="ALLOCATION_METRIC_JB"/>

<DIAttribute name="job_print_version" value="no"/>

<DIAttribute name="job_testmode_enabled" value="no"/>

<DIAttribute name="job_trace_abapquery" value="no"/>

<DIAttribute name="job_trace_all" value="no"/>

<DIAttribute name="job_trace_ascomm" value="no"/>

<DIAttribute name="job_trace_assemblers" value="no"/>

<DIAttribute name="job_trace_audit" value="no"/>

<DIAttribute name="job_trace_dataflow" value="yes"/>

<DIAttribute name="job_trace_idoc_file" value="no"/>

<DIAttribute name="job_trace_memory_loader" value="no"/>

<DIAttribute name="job_trace_memory_reader" value="no"/>

<DIAttribute name="job_trace_optimized_dataflow" value="no"/>

<DIAttribute name="job_trace_parallel_execution" value="no"/>

<DIAttribute name="job_trace_rfc_function" value="no"/>

<DIAttribute name="job_trace_row" value="no"/>

<DIAttribute name="job_trace_script" value="no"/>

<DIAttribute name="job_trace_session" value="yes"/>

<DIAttribute name="job_trace_sql_only" value="no"/>

<DIAttribute name="job_trace_sqlfunctions" value="no"/>

<DIAttribute name="job_trace_sqlloaders" value="no"/>

<DIAttribute name="job_trace_sqlreaders" value="no"/>

<DIAttribute name="job_trace_sqltransforms" value="no"/>

<DIAttribute name="job_trace_stored_procedure" value="no"/>

<DIAttribute name="job_trace_table" value="no"/>

<DIAttribute name="job_trace_table_reader" value="no"/>

<DIAttribute name="job_trace_transform" value="no"/>

<DIAttribute name="job_trace_userfunction" value="no"/>

<DIAttribute name="job_trace_usertransform" value="no"/>

<DIAttribute name="job_trace_workflow" value="yes"/>

<DIAttribute name="job_type" value="batch"/>

<DIAttribute name="job_use_statistics" value="yes"/>

<DIAttribute name="locale_codepage" value="&lt;default&gt;"/>

<DIAttribute name="locale_language" value="&lt;default&gt;"/>

<DIAttribute name="locale_territory" value="&lt;default&gt;"/>

</DIAttributes>

</DIJob>

<DIWorkflow name="ALLOCATION_METRIC_REGEN_VIEW_CONT_WF" typeId="2" >

<DISteps>

<DICallStep typeId="0"  calledObjectType="Workflow" name="ALLOCATION_METRIC_REGEN_VIEW_WF" >

</DICallStep>

</DISteps>

<DIAttributes>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="unit_of_recovery" value="no"/>

</DIAttributes>

</DIWorkflow>

<DIWorkflow name="ALLOCATION_METRIC_REGEN_VIEW_WF" typeId="2" >

<DIProperties>

<DIAttribute name="Description" value="This workflows sorts, identifies and processes new, update SCD1 and SCD2, and delete records."/>

</DIProperties>

<DIVariables>

<DIElement paramType="LOCAL" name="$l_metadata_schema" datatype="VARCHAR" size="50" >

</DIElement>

</DIVariables>

<DISteps>

<DITryStep typeId="13" >

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_REGEN_VIEW_TRY"/>

</DIUIOptions>

<DISteps>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_REGEN_VIEW_START_SC"/>

<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >

<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

<DICallStep typeId="1"  calledObjectType="Dataflow" name="ALLOCATION_METRIC_REGEN_VIEW_DF" >

</DICallStep>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that closes the metadata for the workflow."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_REGEN_VIEW_END_SC"/>

<DIAttribute name="ui_script_text" value="sql('DW_DS','exec dwt.sp_create_federated_dim_v');&#xD;&#xA;&#xD;&#xA;# CALL FUNCTION TO TRACK END OF WORKFLOW&#xD;&#xA;ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="sql('DW_DS', 'exec dwt.sp_create_federated_dim_v')" >

<FUNCTION_CALL name="sql"  type="DI" >

<CONSTANT value="DW_DS" datatype="VARCHAR" size="5" />

<CONSTANT value="exec dwt.sp_create_federated_dim_v" datatype="VARCHAR" size="34" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >

<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

</DISteps>

<DICatch typeId="20" errorCode="210101" >

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_REGEN_VIEW_CATCH"/>

</DIUIOptions>

<DISteps>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflows."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_REGEN_VIEW_FAIL_SC"/>

<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >

<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

<CONCAT>

<CONCAT>

<CONCAT>

<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />

<FUNCTION_CALL name="error_number"  type="DI" />

</CONCAT>

<CONSTANT value="\] " datatype="VARCHAR" size="3" />

</CONCAT>

<FUNCTION_CALL name="error_message"  type="DI" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

</DISteps>

</DICatch>

</DITryStep>

</DISteps>

<DIAttributes>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="unit_of_recovery" value="no"/>

</DIAttributes>

</DIWorkflow>

<DIDataflow name="ALLOCATION_METRIC_REGEN_VIEW_DF" typeId="1" >

<DIProperties>

<DIAttribute name="Description" value="The dataflow for extraction sources data from the defined source table.  Data is pulled from the source table based on the source tables LASTMODDATE value.  All data that was inserted or updated after a specific date will be loaded into the target file.  &#xA;The file that is created by the process will be a delimited file.  The delimiter for this file is |^|.  The dataflow not only loads the target file it also writes an audit file.  The audit file contains the source count and the target count based on the specific where clause.  This file will be used by an ABC audit process outside of the ETL process."/>

</DIProperties>

<DITransforms>

<DIExcelSource typeID="130" datastoreName="METRIC_ALLOCATION_EXTN_SOURCE_XLS" name="METRIC_ALLOCATION_EXTN_SOURCE_XLS" >

<DIOutputView name="METRIC_ALLOCATION_EXTN_SOURCE_XLS"  />

<DIAttributes>

<DIAttribute name="MSExcel_capture_data_conversion" value="no"/>

<DIAttribute name="cache" value="no"/>

<DIAttribute name="connection_port" value="no"/>

<DIAttribute name="reader_filename_col" value="DI_FILENAME"/>

<DIAttribute name="reader_filename_col_size" value="100"/>

<DIAttribute name="reader_filename_only" value="yes"/>

<DIAttribute name="reader_include_filename" value="no"/>

<DIAttribute name="table_weight" value="0"/>

</DIAttributes>

</DIExcelSource>



<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS"/>

<DIAttribute name="ui_display_name" value="QRY_DISTINCT_DIMS"/>

<DIAttribute name="ui_where_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_NAME IS NOT NULL"/>

</DIUIOptions>

<DISchema name="QRY_DISTINCT_DIMS" >

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect isDistinct="true">

<DIProjection>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="DIMENSION_NAME" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="METRIC_ALLOCATION_EXTN_SOURCE_XLS" />

</DIFrom>

<DIWhere>

<DIExpression isString="true" expr="(METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_NAME IS NOT  NULL )" >

<LOGICAL_OP op="IS NOT NULL">

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="DIMENSION_NAME" />

</LOGICAL_OP>

</DIExpression>

</DIWhere>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="QRY_DISTINCT_DIMS"/>

<DIAttribute name="ui_display_name" value="QRY_ADD_IDS"/>

</DIUIOptions>

<DISchema name="QRY_ADD_IDS" >

<DIElement name="ID" datatype="DECIMAL" precision="19" scale="0" key="true" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="gen_row_num()+5"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="QRY_DISTINCT_DIMS.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="(gen_row_num() + 5)" >

<ADD>

<FUNCTION_CALL name="gen_row_num"  type="DI" />

<CONSTANT value="5" datatype="INT" />

</ADD>

</DIExpression>

<DIExpression isString="true" expr="QRY_DISTINCT_DIMS.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="QRY_DISTINCT_DIMS" column="DIMENSION_NAME" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="QRY_DISTINCT_DIMS" />

</DIFrom>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_DS" ownerName="DW_ALIAS" tableName="ALLOCATION_METRIC_REQUIRED_DIMS" >

<DIInputView name="QRY_ADD_IDS"  />

<DIAttributes>

<DIAttribute name="LDRLiveLoad" value="no"/>

<DIAttribute name="Table_Type" value="TABLE"/>

<DIAttribute name="connection_port" value="no"/>

<DIAttribute name="ldr_configuration_enabled" value="yes"/>

<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">


<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows></bulk_ldr_all_rows>
<bulk_ldr_max_errors></bulk_ldr_max_errors>
<bulk_ldr_rows_per_commit></bulk_ldr_rows_per_commit>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>No</ignore_columns_null>
<ignore_columns_value></ignore_columns_value>
<loader_auto_correct>no</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map></loader_delete_map>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map></loader_insert_map>
<loader_load_choice>replace</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_DS_DW_ALIAS_ALLOCATION_METRIC_REQUIRED_DIMS.txt</loader_overflow_file>
<loader_post_load1>SET IDENTITY_INSERT dwt.allocation_metric_required_dims OFF</loader_post_load1>
<loader_post_load2></loader_post_load2>
<loader_pre_load1>SET IDENTITY_INSERT dwt.allocation_metric_required_dims ON</loader_pre_load1>
<loader_pre_load2></loader_pre_load2>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map></loader_update_map>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename></overriding_substitution_parameter_for_tablename>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text></sql_text>
</LDRConfiguration>
</LDRConfigurations>

</DIAttribute>

<DIAttribute name="loader_template_table" value="no"/>

<DIAttribute name="name" value="DW_DS"/>

<DIAttribute name="use_unicode_varchar" value="no"/>

</DIAttributes>

</DIDatabaseTableTarget>



</DITransforms>

<DIAttributes>

<DIAttribute name="Audit" hasNestedXMLTree ="true">


<Audit>
<AuditObjects>
</AuditObjects>
<AuditRules>
</AuditRules>
<Notifications>
<RaiseException Enabled="true" >
</RaiseException>
<Mail Enabled="false" ></Mail>
<Script Enabled="false" ></Script>
</Notifications>
</Audit>


</DIAttribute>

<DIAttribute name="Cache_type" value="pageable_cache"/>

<DIAttribute name="Parallelism_degree" value="0"/>

<DIAttribute name="allows_both_input_and_output" value="yes"/>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="use_dataflow_links" value="no"/>

<DIAttribute name="use_datastore_links" value="yes"/>

<DIAttribute name="validation_xform_exists" value="no"/>

<DIAttribute name="validation_xform_stats" value="no"/>

</DIAttributes>

</DIDataflow>

<DIWorkflow name="ALLOCATION_METRIC_DELETE_CONT_WF" typeId="2" >

<DISteps>

<DICallStep typeId="0"  calledObjectType="Workflow" name="ALLOCATION_METRIC_DELETE_WF" >

</DICallStep>

</DISteps>

<DIAttributes>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="unit_of_recovery" value="no"/>

</DIAttributes>

</DIWorkflow>

<DIWorkflow name="ALLOCATION_METRIC_DELETE_WF" typeId="2" >

<DIProperties>

<DIAttribute name="Description" value="This workflows sorts, identifies and processes new, update SCD1 and SCD2, and delete records."/>

</DIProperties>

<DISteps>

<DITryStep typeId="13" >

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_DELETE_TRY"/>

</DIUIOptions>

<DISteps>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_DELETE_START_SC"/>

<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >

<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

<DICallStep typeId="1"  calledObjectType="Dataflow" name="ALLOCATION_METRIC_DELETE_FF_DF" >

</DICallStep>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that closes the metadata for the workflow."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_DELETE_END_SC"/>

<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK END OF WORKFLOW&#xD;&#xA;ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >

<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

</DISteps>

<DICatch typeId="20" errorCode="210101" >

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_DELETE_CATCH"/>

</DIUIOptions>

<DISteps>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflows."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_INITIAL_FAIL_SC"/>

<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >

<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

<CONCAT>

<CONCAT>

<CONCAT>

<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />

<FUNCTION_CALL name="error_number"  type="DI" />

</CONCAT>

<CONSTANT value="\] " datatype="VARCHAR" size="3" />

</CONCAT>

<FUNCTION_CALL name="error_message"  type="DI" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

</DISteps>

</DICatch>

</DITryStep>

</DISteps>

<DIAttributes>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="unit_of_recovery" value="no"/>

</DIAttributes>

</DIWorkflow>

<DIDataflow name="ALLOCATION_METRIC_DELETE_FF_DF" typeId="1" >

<DIProperties>

<DIAttribute name="Description" value="The dataflow for extraction sources data from the defined source table.  Data is pulled from the source table based on the source tables LASTMODDATE value.  All data that was inserted or updated after a specific date will be loaded into the target file.  &#xA;The file that is created by the process will be a delimited file.  The delimiter for this file is |^|.  The dataflow not only loads the target file it also writes an audit file.  The audit file contains the source count and the target count based on the specific where clause.  This file will be used by an ABC audit process outside of the ETL process."/>

</DIProperties>

<DITransforms>

<DIExcelSource typeID="130" datastoreName="METRIC_ALLOCATION_EXTN_SOURCE_XLS" name="METRIC_ALLOCATION_EXTN_SOURCE_XLS" >

<DIOutputView name="METRIC_ALLOCATION_EXTN_SOURCE_XLS"  />

</DIExcelSource>



<DITransformCall typeId="111" name="Validation" >

<DIUIOptions>

<DIAttribute name="ui_display_name" value="VLDT_VALID_DIMS"/>

</DIUIOptions>

<DIInputView name="QRY_REMOVE_DUMMY"  />

<DISchema name="VLDT_VALID_DIMS_Pass" >

</DISchema>

<DISchema name="VLDT_VALID_DIMS_Fail" >

</DISchema>

<DIAttributes>

<DIAttribute name="validation_rules" hasNestedXMLTree ="true">


<Rules collectStats="false" collectData="false" >
<Column name="QRY_REMOVE_DUMMY.DIMENSION_NAME" enableValidation="false" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>(QRY_REMOVE_DUMMY.DIMENSION_NAME = lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_NAME ], [ -2 ], [ DIMENSION_NAME, '=', QRY_REMOVE_DUMMY.DIMENSION_NAME ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;)</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.DIMENSION_VALUE" enableValidation="true" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>(QRY_REMOVE_DUMMY.DIMENSION_VALUE != lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_VALUE ], [ -2 ], [ DIMENSION_NAME, '=', QRY_REMOVE_DUMMY.DIMENSION_NAME ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;)</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.METRIC_AMOUNT" enableValidation="true" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="1">
<UIValue1>&gt;</UIValue1>
<UIValue2>0</UIValue2>
<Custom>QRY_REMOVE_DUMMY.METRIC_AMOUNT &gt; 0</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.METRIC_NAME" enableValidation="true" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>(QRY_REMOVE_DUMMY.METRIC_NAME IS NOT  NULL )</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.PERIOD_DATE_START" enableValidation="true" noValidationWhenNull="false" >
<RuleName>VALID_PERIOD</RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>(lookup_ext([DW_DS.DW_ALIAS.PERIOD_DIM, 'PRE_LOAD_CACHE', 'MAX'], [ PK_PERIOD_ID ], [ -2 ], [ START_DATE, '&lt;=', QRY_REMOVE_DUMMY.PERIOD_DATE_START, END_DATE, '&gt;=', QRY_REMOVE_DUMMY.PERIOD_DATE_END, PERIODICITY, '=', 'MONTHLY', FINANCIAL_USAGE_TYPE, '=', 'FISCAL' ])  != -2) AND QRY_REMOVE_DUMMY.PERIOD_DATE_START&lt;=QRY_REMOVE_DUMMY.PERIOD_DATE_END</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
</Rules>


</DIAttribute>

</DIAttributes>

</DITransformCall>

<DITransformCall typeId="111" name="Table_Comparison" >

<DIUIOptions>

<DIAttribute name="ui_display_name" value="TC_ALLOCATION_METRIC"/>

</DIUIOptions>

<DIInputView name="QRY_PREP_TC"  />

<DISchema name="ALLOCATION_METRIC" >

</DISchema>

<DIAttributes>

<DIAttribute name="cache_comparison_table" value="no"/>

<DIAttribute name="compare_column1" value="METRIC_DESCRIPTION"/>

<DIAttribute name="compare_column2" value="METRIC_AMOUNT"/>

<DIAttribute name="database_datastore" value="DW_DS"/>

<DIAttribute name="detect_all_dup_deletes" value="yes"/>

<DIAttribute name="detect_delete" value="yes"/>

<DIAttribute name="generated_key_column" value="ID"/>

<DIAttribute name="primary_key_column1" value="METRIC_NAME"/>

<DIAttribute name="primary_key_column2" value="DIMENSION_NAME"/>

<DIAttribute name="primary_key_column3" value="PERIOD_ID"/>

<DIAttribute name="primary_key_column4" value="DIMENSION_ID"/>

<DIAttribute name="run_as_separate_process" value="no"/>

<DIAttribute name="source_is_sorted" value="no"/>

<DIAttribute name="table_name" value="ALLOCATION_METRIC"/>

<DIAttribute name="table_owner" value="DW_ALIAS"/>

<DIAttribute name="update_cache" value="no"/>

</DIAttributes>

</DITransformCall>

<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="MO_UDPATE"/>

<DIAttribute name="ui_display_name" value="QRY_ASSIGN_IDS_DEL"/>

<DIAttribute name="ui_where_text" value="MO_UDPATE.MD_DELETEDDATE IS NULL"/>

</DIUIOptions>

<DISchema name="QRY_ASSIGN_IDS_DEL" >

<DIElement name="ID" datatype="INT" key="true" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.ID"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="50" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="100" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="50" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.PERIOD_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.DIMENSION_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_DK" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.DIMENSION_DK"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DECIMAL" precision="12" scale="2" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_DURABLE_KEY" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.MD_DURABLE_KEY"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.MD_CREATEDDATE"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="sysdate()"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="sysdate()"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="NULL"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="'Y'"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="'N'"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="MO_UDPATE.ID" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="ID" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.PERIOD_ID" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="PERIOD_ID" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.DIMENSION_ID" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="DIMENSION_ID" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.DIMENSION_DK" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="DIMENSION_DK" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="METRIC_AMOUNT" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.MD_DURABLE_KEY" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="MD_DURABLE_KEY" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.MD_CREATEDDATE" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="MD_CREATEDDATE" />

</DIExpression>

<DIExpression isString="true" expr="sysdate()" >

<FUNCTION_CALL name="sysdate"  type="DI" />

</DIExpression>

<DIExpression isString="true" expr="sysdate()" >

<FUNCTION_CALL name="sysdate"  type="DI" />

</DIExpression>

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

<DIExpression isString="true" expr="'Y'" >

<CONSTANT value="Y" datatype="VARCHAR" size="1" />

</DIExpression>

<DIExpression isString="true" expr="'N'" >

<CONSTANT value="N" datatype="VARCHAR" size="1" />

</DIExpression>

<DIExpression isString="true" expr="$G_BATCH_ID" >

<VARIABLE_REFERENCE name="$G_BATCH_ID" />

</DIExpression>

<DIExpression isString="true" expr="$G_PROCESS_ID" >

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="MO_UDPATE" />

</DIFrom>

<DIWhere>

<DIExpression isString="true" expr="(MO_UDPATE.MD_DELETEDDATE IS  NULL )" >

<LOGICAL_OP op="IS NULL">

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="MD_DELETEDDATE" />

</LOGICAL_OP>

</DIExpression>

</DIWhere>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DITransformCall typeId="111" name="Map_Operation" >

<DIUIOptions>

<DIAttribute name="ui_display_name" value="MO_UDPATE"/>

</DIUIOptions>

<DIInputView name="ALLOCATION_METRIC"  />

<DISchema name="MO_UDPATE" >

</DISchema>

<DIAttributes>

<DIAttribute name="delete" value="update"/>

<DIAttribute name="insert" value="discard"/>

<DIAttribute name="normal" value="discard"/>

<DIAttribute name="update" value="discard"/>

</DIAttributes>

</DITransformCall>

<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="VLDT_VALID_DIMS_Pass"/>

<DIAttribute name="ui_display_name" value="QRY_PREP_TC"/>

</DIUIOptions>

<DISchema name="QRY_PREP_TC" >

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="lookup_ext([DW_DS.DW_ALIAS.PERIOD_DIM, 'PRE_LOAD_CACHE', 'MAX'], [ PK_PERIOD_ID ], [ -2 ], [ START_DATE, '&lt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, END_DATE, '&gt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, PERIODICITY, '=', 'DAILY', FINANCIAL_USAGE_TYPE, '=', 'FISCAL' ])"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_ID ], [ -2 ], [ DIMENSION_NAME, '=', VLDT_VALID_DIMS_Pass.DIMENSION_NAME, DIMENSION_VALUE, '=', VLDT_VALID_DIMS_Pass.DIMENSION_VALUE  ]) &#xD;&#xA;SET(&quot;run_as_separate_process&quot; = 'no')"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DOUBLE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="lookup_ext([DW_DS.DW_ALIAS.PERIOD_DIM, 'PRE_LOAD_CACHE', 'MAX'], [ PK_PERIOD_ID ], [ -2 ], [ START_DATE, '&lt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, END_DATE, '&gt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, PERIODICITY, '=', 'DAILY', FINANCIAL_USAGE_TYPE, '=', 'FISCAL' ]) " >

<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_DS" tableOwner="DW_ALIAS" tableName="PERIOD_DIM" >

<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />

<CONSTANT value="MAX" datatype="VARCHAR" size="3" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="PERIOD_DATE_START" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="PERIOD_DATE_START" />

<CONSTANT value="DAILY" datatype="VARCHAR" size="5" />

<CONSTANT value="FISCAL" datatype="VARCHAR" size="6" />

<CONSTANT value="-2" datatype="INT" />

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_ID ], [ -2 ], [ DIMENSION_NAME, '=', VLDT_VALID_DIMS_Pass.DIMENSION_NAME, DIMENSION_VALUE, '=', VLDT_VALID_DIMS_Pass.DIMENSION_VALUE ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >

<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_DS" tableOwner="DW_ALIAS" tableName="FEDERATED_DIM_V" >

<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />

<CONSTANT value="MAX" datatype="VARCHAR" size="3" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_NAME" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_VALUE" />

<CONSTANT value="-2" datatype="INT" />

<DIAttributes>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="METRIC_AMOUNT" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="VLDT_VALID_DIMS_Pass" />

</DIFrom>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="VLDT_VALID_DIMS_Fail"/>

<DIAttribute name="ui_display_name" value="QRY_REFORMAT_FAILS"/>

</DIUIOptions>

<DISchema name="QRY_REFORMAT_FAILS" >

<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_START" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.PERIOD_DATE_START"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_END" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.PERIOD_DATE_END"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_VALUE" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DIMENSION_VALUE"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DECIMAL" precision="12" scale="2" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

<DIElement name="DI_ERRORACTION" datatype="VARCHAR" size="1" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DI_ERRORACTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DI_ERRORCOLUMNS" datatype="VARCHAR" size="500" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DI_ERRORCOLUMNS"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="$G_BATCH_ID" >

<VARIABLE_REFERENCE name="$G_BATCH_ID" />

</DIExpression>

<DIExpression isString="true" expr="$G_PROCESS_ID" >

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.PERIOD_DATE_START" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="PERIOD_DATE_START" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.PERIOD_DATE_END" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="PERIOD_DATE_END" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DIMENSION_VALUE" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DIMENSION_VALUE" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="METRIC_AMOUNT" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DI_ERRORACTION" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DI_ERRORACTION" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DI_ERRORCOLUMNS" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DI_ERRORCOLUMNS" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="VLDT_VALID_DIMS_Fail" />

</DIFrom>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS"/>

<DIAttribute name="ui_display_name" value="QRY_REMOVE_DUMMY"/>

<DIAttribute name="ui_where_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME IS NOT NULL AND METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME!='DUMMY - DO NOT REMOVE'"/>

</DIUIOptions>

<DISchema name="QRY_REMOVE_DUMMY" >

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_START" datatype="DATE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_START"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_END" datatype="DATE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_END"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_VALUE" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_VALUE"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DOUBLE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_START" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="PERIOD_DATE_START" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_END" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="PERIOD_DATE_END" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_VALUE" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="DIMENSION_VALUE" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_AMOUNT" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="METRIC_ALLOCATION_EXTN_SOURCE_XLS" />

</DIFrom>

<DIWhere>

<DIExpression isString="true" expr="((METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME IS NOT  NULL ) AND&#xA;   (METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME != 'DUMMY - DO NOT REMOVE'))" >

<LOGICAL_OP op="AND">

<LOGICAL_OP op="IS NOT NULL">

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_NAME" />

</LOGICAL_OP>

<LOGICAL_OP op="NE">

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_NAME" />

<CONSTANT value="DUMMY - DO NOT REMOVE" datatype="VARCHAR" size="21" />

</LOGICAL_OP>

</LOGICAL_OP>

</DIExpression>

</DIWhere>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="SRCSTAGING_DS" ownerName="SRCSTAGING_ALIAS" tableName="ALLOCATION_METRIC_VALF" >

<DIInputView name="QRY_REFORMAT_FAILS"  />

<DIAttributes>

<DIAttribute name="LDRLiveLoad" value="no"/>

<DIAttribute name="Table_Type" value="TABLE"/>

<DIAttribute name="connection_port" value="no"/>

<DIAttribute name="ldr_configuration_enabled" value="yes"/>

<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">


<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>yes</auto_correct_using_merge>
<bulk_ldr_all_rows></bulk_ldr_all_rows>
<bulk_ldr_max_errors></bulk_ldr_max_errors>
<bulk_ldr_rows_per_commit>1000</bulk_ldr_rows_per_commit>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>no</ignore_columns_null>
<ignore_columns_value></ignore_columns_value>
<loader_auto_correct>no</loader_auto_correct>
<loader_bulk_load></loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map></loader_delete_map>
<loader_drop_and_create_table>yes</loader_drop_and_create_table>
<loader_insert_map></loader_insert_map>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>overflow_file</loader_overflow_file>
<loader_post_load1></loader_post_load1>
<loader_pre_load1></loader_pre_load1>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map></loader_update_map>
<loader_use_user_defined_keys>no</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>0</mssql_bulk_ldr_packet_size>
<overflow_file_format>write_data</overflow_file_format>
<overriding_substitution_parameter_for_tablename></overriding_substitution_parameter_for_tablename>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text></sql_text>
</LDRConfiguration>
</LDRConfigurations>

</DIAttribute>

<DIAttribute name="loader_template_table" value="no"/>

<DIAttribute name="name" value="SRCSTAGING_DS"/>

<DIAttribute name="use_unicode_varchar" value="no"/>

</DIAttributes>

</DIDatabaseTableTarget>



<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_DS" ownerName="DW_ALIAS" tableName="ALLOCATION_METRIC" >

<DIInputView name="QRY_ASSIGN_IDS_DEL"  />

<DIAttributes>

<DIAttribute name="LDRLiveLoad" value="no"/>

<DIAttribute name="Table_Type" value="TABLE"/>

<DIAttribute name="connection_port" value="no"/>

<DIAttribute name="ldr_configuration_enabled" value="yes"/>

<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">


<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows></bulk_ldr_all_rows>
<bulk_ldr_max_errors></bulk_ldr_max_errors>
<bulk_ldr_rows_per_commit></bulk_ldr_rows_per_commit>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>no</ignore_columns_null>
<ignore_columns_value></ignore_columns_value>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map></loader_delete_map>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map></loader_insert_map>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_DS_DW_ALIAS_ALLOCATION_METRIC.txt</loader_overflow_file>
<loader_post_load1>SET IDENTITY_INSERT dwt.allocation_metric OFF</loader_post_load1>
<loader_post_load2></loader_post_load2>
<loader_pre_load1>SET IDENTITY_INSERT dwt.allocation_metric ON</loader_pre_load1>
<loader_pre_load2></loader_pre_load2>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map></loader_update_map>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename></overriding_substitution_parameter_for_tablename>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text></sql_text>
</LDRConfiguration>
</LDRConfigurations>

</DIAttribute>

<DIAttribute name="loader_template_table" value="no"/>

<DIAttribute name="name" value="DW_DS"/>

<DIAttribute name="use_unicode_varchar" value="no"/>

</DIAttributes>

</DIDatabaseTableTarget>



</DITransforms>

<DIAttributes>

<DIAttribute name="Audit" hasNestedXMLTree ="true">


<Audit>
<AuditObjects>
</AuditObjects>
<AuditRules>
</AuditRules>
<Notifications>
<RaiseException Enabled="true" >
</RaiseException>
<Mail Enabled="false" ></Mail>
<Script Enabled="false" ></Script>
</Notifications>
</Audit>


</DIAttribute>

<DIAttribute name="Cache_type" value="pageable_cache"/>

<DIAttribute name="Parallelism_degree" value="0"/>

<DIAttribute name="allows_both_input_and_output" value="yes"/>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="use_dataflow_links" value="no"/>

<DIAttribute name="use_datastore_links" value="yes"/>

<DIAttribute name="validation_xform_exists" value="yes"/>

<DIAttribute name="validation_xform_stats" value="no"/>

</DIAttributes>

</DIDataflow>

<DIWorkflow name="ALLOCATION_METRIC_UPDATE_CONT_WF" typeId="2" >

<DISteps>

<DICallStep typeId="0"  calledObjectType="Workflow" name="ALLOCATION_METRIC_UPDATE_WF" >

</DICallStep>

</DISteps>

<DIAttributes>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="unit_of_recovery" value="no"/>

</DIAttributes>

</DIWorkflow>

<DIWorkflow name="ALLOCATION_METRIC_UPDATE_WF" typeId="2" >

<DIProperties>

<DIAttribute name="Description" value="This workflows sorts, identifies and processes new, update SCD1 and SCD2, and delete records."/>

</DIProperties>

<DISteps>

<DITryStep typeId="13" >

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_UPDATE_TRY"/>

</DIUIOptions>

<DISteps>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_UPDATE_START_SC"/>

<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >

<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

<DICallStep typeId="1"  calledObjectType="Dataflow" name="ALLOCATION_METRIC_UPDATE_FF_DF" >

</DICallStep>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that closes the metadata for the workflow."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_UPDATE_END_SC"/>

<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK END OF WORKFLOW&#xD;&#xA;ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >

<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

</DISteps>

<DICatch typeId="20" errorCode="210101" >

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_UPDATE_CATCH"/>

</DIUIOptions>

<DISteps>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflows."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_INITIAL_FAIL_SC"/>

<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >

<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

<CONCAT>

<CONCAT>

<CONCAT>

<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />

<FUNCTION_CALL name="error_number"  type="DI" />

</CONCAT>

<CONSTANT value="\] " datatype="VARCHAR" size="3" />

</CONCAT>

<FUNCTION_CALL name="error_message"  type="DI" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

</DISteps>

</DICatch>

</DITryStep>

</DISteps>

<DIAttributes>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="unit_of_recovery" value="no"/>

</DIAttributes>

</DIWorkflow>

<DIDataflow name="ALLOCATION_METRIC_UPDATE_FF_DF" typeId="1" >

<DIUIOptions>

<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This QRY will filter all records so none make it to the VALF table.  All records from the spreadsheet that failed validation will be sent to the VALF table via the DELETE_WF.  To turn on the passing of invalid records to the ALLOCATION_METRIC_VALF table, remove the WHERE clause in QRY_REFORMAT_FAILS."/>

</DIAnnotation></DIUIOptions>

<DIProperties>

<DIAttribute name="Description" value="The dataflow for extraction sources data from the defined source table.  Data is pulled from the source table based on the source tables LASTMODDATE value.  All data that was inserted or updated after a specific date will be loaded into the target file.  &#xA;The file that is created by the process will be a delimited file.  The delimiter for this file is |^|.  The dataflow not only loads the target file it also writes an audit file.  The audit file contains the source count and the target count based on the specific where clause.  This file will be used by an ABC audit process outside of the ETL process."/>

</DIProperties>

<DITransforms>

<DIExcelSource typeID="130" datastoreName="METRIC_ALLOCATION_EXTN_SOURCE_XLS" name="METRIC_ALLOCATION_EXTN_SOURCE_XLS" >

<DIOutputView name="METRIC_ALLOCATION_EXTN_SOURCE_XLS"  />

<DIAttributes>

<DIAttribute name="MSExcel_capture_data_conversion" value="no"/>

<DIAttribute name="cache" value="no"/>

<DIAttribute name="connection_port" value="no"/>

<DIAttribute name="reader_filename_col" value="DI_FILENAME"/>

<DIAttribute name="reader_filename_col_size" value="100"/>

<DIAttribute name="reader_filename_only" value="yes"/>

<DIAttribute name="reader_include_filename" value="no"/>

<DIAttribute name="table_weight" value="0"/>

</DIAttributes>

</DIExcelSource>



<DITransformCall typeId="111" name="Validation" >

<DIUIOptions>

<DIAttribute name="ui_display_name" value="VLDT_VALID_DIMS"/>

</DIUIOptions>

<DIInputView name="QRY_REMOVE_DUMMY"  />

<DISchema name="VLDT_VALID_DIMS_Pass" >

</DISchema>

<DISchema name="VLDT_VALID_DIMS_Fail" >

</DISchema>

<DIAttributes>

<DIAttribute name="validation_rules" hasNestedXMLTree ="true">


<Rules collectStats="false" collectData="false" >
<Column name="QRY_REMOVE_DUMMY.DIMENSION_NAME" enableValidation="false" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>(QRY_REMOVE_DUMMY.DIMENSION_NAME = lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_NAME ], [ -2 ], [ DIMENSION_NAME, '=', QRY_REMOVE_DUMMY.DIMENSION_NAME ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;)</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.DIMENSION_VALUE" enableValidation="true" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>(QRY_REMOVE_DUMMY.DIMENSION_VALUE != lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_VALUE ], [ -2 ], [ DIMENSION_NAME, '=', QRY_REMOVE_DUMMY.DIMENSION_NAME ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;)</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.METRIC_AMOUNT" enableValidation="true" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="1">
<UIValue1>&gt;</UIValue1>
<UIValue2>0</UIValue2>
<Custom>QRY_REMOVE_DUMMY.METRIC_AMOUNT &gt; 0</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.METRIC_NAME" enableValidation="true" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>(QRY_REMOVE_DUMMY.METRIC_NAME IS NOT  NULL )</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.PERIOD_DATE_START" enableValidation="true" noValidationWhenNull="false" >
<RuleName>VALID_PERIOD</RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>(lookup_ext([DW_DS.DW_ALIAS.PERIOD_DIM, 'PRE_LOAD_CACHE', 'MAX'], [ PK_PERIOD_ID ], [ -2 ], [ START_DATE, '&lt;=', QRY_REMOVE_DUMMY.PERIOD_DATE_START, END_DATE, '&gt;=', QRY_REMOVE_DUMMY.PERIOD_DATE_END, PERIODICITY, '=', 'MONTHLY', FINANCIAL_USAGE_TYPE, '=', 'FISCAL' ])  != -2) AND QRY_REMOVE_DUMMY.PERIOD_DATE_START&lt;=QRY_REMOVE_DUMMY.PERIOD_DATE_END</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
</Rules>


</DIAttribute>

</DIAttributes>

</DITransformCall>

<DITransformCall typeId="111" name="Table_Comparison" >

<DIUIOptions>

<DIAttribute name="ui_display_name" value="TC_ALLOCATION_METRIC"/>

</DIUIOptions>

<DIInputView name="QRY_PREP_TC"  />

<DISchema name="ALLOCATION_METRIC" >

</DISchema>

<DIAttributes>

<DIAttribute name="cache_comparison_table" value="no"/>

<DIAttribute name="compare_column1" value="METRIC_DESCRIPTION"/>

<DIAttribute name="compare_column2" value="METRIC_AMOUNT"/>

<DIAttribute name="compare_column3" value="MD_DELETEDDATE"/>

<DIAttribute name="database_datastore" value="DW_DS"/>

<DIAttribute name="detect_all_dup_deletes" value="no"/>

<DIAttribute name="detect_delete" value="no"/>

<DIAttribute name="generated_key_column" value="ID"/>

<DIAttribute name="primary_key_column1" value="METRIC_NAME"/>

<DIAttribute name="primary_key_column2" value="DIMENSION_ID"/>

<DIAttribute name="primary_key_column3" value="PERIOD_ID"/>

<DIAttribute name="primary_key_column4" value="DIMENSION_NAME"/>

<DIAttribute name="run_as_separate_process" value="no"/>

<DIAttribute name="source_is_sorted" value="no"/>

<DIAttribute name="table_name" value="ALLOCATION_METRIC"/>

<DIAttribute name="table_owner" value="DW_ALIAS"/>

<DIAttribute name="update_cache" value="no"/>

</DIAttributes>

</DITransformCall>

<DITransformCall typeId="111" name="Map_Operation" >

<DIUIOptions>

<DIAttribute name="ui_display_name" value="MO_INSERT"/>

</DIUIOptions>

<DIInputView name="ALLOCATION_METRIC"  />

<DISchema name="MO_INSERT" >

</DISchema>

<DIAttributes>

<DIAttribute name="delete" value="discard"/>

<DIAttribute name="insert" value="insert"/>

<DIAttribute name="normal" value="discard"/>

<DIAttribute name="update" value="discard"/>

</DIAttributes>

</DITransformCall>

<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="MO_INSERT"/>

<DIAttribute name="ui_display_name" value="QRY_ASSIGN_IDS_INS"/>

</DIUIOptions>

<DISchema name="QRY_ASSIGN_IDS_INS" >

<DIElement name="ID" datatype="INT" key="true" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="greatest(5+gen_row_num(),key_generation('DW_DS.DW_ALIAS.ALLOCATION_METRIC',ID,1))"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="50" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_INSERT.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="100" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_INSERT.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="50" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_INSERT.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_INSERT.PERIOD_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_INSERT.DIMENSION_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_DK" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_INSERT.DIMENSION_DK"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DECIMAL" precision="12" scale="2" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_INSERT.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_DURABLE_KEY" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="greatest(5+gen_row_num(),key_generation('DW_DS.DW_ALIAS.ALLOCATION_METRIC',ID,1))"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="sysdate()"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="NULL"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="NULL"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="NULL"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="'Y'"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="'Y'"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="greatest((5 + gen_row_num()), key_generation(DW_DS.DW_ALIAS.ALLOCATION_METRIC, ID, 1) )" >

<FUNCTION_CALL name="greatest"  type="DI" >

<ADD>

<CONSTANT value="5" datatype="INT" />

<FUNCTION_CALL name="gen_row_num"  type="DI" />

</ADD>

<FUNCTION_CALL name="key_generation"  type="DI" tableDatastore="DW_DS" tableOwner="DW_ALIAS" tableName="ALLOCATION_METRIC" >

<COLUMN_REFERENCE  column="ID" />

<CONSTANT value="1" datatype="INT" />

</FUNCTION_CALL>

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="MO_INSERT.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="MO_INSERT" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="MO_INSERT.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="MO_INSERT" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="MO_INSERT.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="MO_INSERT" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="MO_INSERT.PERIOD_ID" >

<COLUMN_REFERENCE  qualifier1="MO_INSERT" column="PERIOD_ID" />

</DIExpression>

<DIExpression isString="true" expr="MO_INSERT.DIMENSION_ID" >

<COLUMN_REFERENCE  qualifier1="MO_INSERT" column="DIMENSION_ID" />

</DIExpression>

<DIExpression isString="true" expr="MO_INSERT.DIMENSION_DK" >

<COLUMN_REFERENCE  qualifier1="MO_INSERT" column="DIMENSION_DK" />

</DIExpression>

<DIExpression isString="true" expr="MO_INSERT.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="MO_INSERT" column="METRIC_AMOUNT" />

</DIExpression>

<DIExpression isString="true" expr="greatest((5 + gen_row_num()), key_generation(DW_DS.DW_ALIAS.ALLOCATION_METRIC, ID, 1) )" >

<FUNCTION_CALL name="greatest"  type="DI" >

<ADD>

<CONSTANT value="5" datatype="INT" />

<FUNCTION_CALL name="gen_row_num"  type="DI" />

</ADD>

<FUNCTION_CALL name="key_generation"  type="DI" tableDatastore="DW_DS" tableOwner="DW_ALIAS" tableName="ALLOCATION_METRIC" >

<COLUMN_REFERENCE  column="ID" />

<CONSTANT value="1" datatype="INT" />

</FUNCTION_CALL>

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="sysdate()" >

<FUNCTION_CALL name="sysdate"  type="DI" />

</DIExpression>

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

<DIExpression isString="true" expr="'Y'" >

<CONSTANT value="Y" datatype="VARCHAR" size="1" />

</DIExpression>

<DIExpression isString="true" expr="'Y'" >

<CONSTANT value="Y" datatype="VARCHAR" size="1" />

</DIExpression>

<DIExpression isString="true" expr="$G_BATCH_ID" >

<VARIABLE_REFERENCE name="$G_BATCH_ID" />

</DIExpression>

<DIExpression isString="true" expr="$G_PROCESS_ID" >

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="MO_INSERT" />

</DIFrom>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="MO_UDPATE"/>

<DIAttribute name="ui_display_name" value="QRY_ASSIGN_IDS_UPD"/>

</DIUIOptions>

<DISchema name="QRY_ASSIGN_IDS_UPD" >

<DIElement name="ID" datatype="INT" key="true" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.ID"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="50" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="100" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="50" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.PERIOD_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.DIMENSION_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_DK" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.DIMENSION_DK"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DECIMAL" precision="12" scale="2" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_DURABLE_KEY" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.MD_DURABLE_KEY"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="MO_UDPATE.MD_CREATEDDATE"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="sysdate()"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="NULL"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="NULL"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="'Y'"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="'Y'"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="MO_UDPATE.ID" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="ID" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.PERIOD_ID" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="PERIOD_ID" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.DIMENSION_ID" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="DIMENSION_ID" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.DIMENSION_DK" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="DIMENSION_DK" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="METRIC_AMOUNT" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.MD_DURABLE_KEY" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="MD_DURABLE_KEY" />

</DIExpression>

<DIExpression isString="true" expr="MO_UDPATE.MD_CREATEDDATE" >

<COLUMN_REFERENCE  qualifier1="MO_UDPATE" column="MD_CREATEDDATE" />

</DIExpression>

<DIExpression isString="true" expr="sysdate()" >

<FUNCTION_CALL name="sysdate"  type="DI" />

</DIExpression>

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

<DIExpression isString="true" expr="'Y'" >

<CONSTANT value="Y" datatype="VARCHAR" size="1" />

</DIExpression>

<DIExpression isString="true" expr="'Y'" >

<CONSTANT value="Y" datatype="VARCHAR" size="1" />

</DIExpression>

<DIExpression isString="true" expr="$G_BATCH_ID" >

<VARIABLE_REFERENCE name="$G_BATCH_ID" />

</DIExpression>

<DIExpression isString="true" expr="$G_PROCESS_ID" >

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="MO_UDPATE" />

</DIFrom>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DITransformCall typeId="111" name="Map_Operation" >

<DIUIOptions>

<DIAttribute name="ui_display_name" value="MO_UDPATE"/>

</DIUIOptions>

<DIInputView name="ALLOCATION_METRIC"  />

<DISchema name="MO_UDPATE" >

</DISchema>

<DIAttributes>

<DIAttribute name="delete" value="discard"/>

<DIAttribute name="insert" value="discard"/>

<DIAttribute name="normal" value="discard"/>

<DIAttribute name="update" value="update"/>

</DIAttributes>

</DITransformCall>

<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="VLDT_VALID_DIMS_Fail"/>

<DIAttribute name="ui_display_name" value="QRY_REFORMAT_FAILS"/>

<DIAttribute name="ui_where_text" value="1=2"/>

</DIUIOptions>

<DISchema name="QRY_REFORMAT_FAILS" >

<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_START" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.PERIOD_DATE_START"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_END" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.PERIOD_DATE_END"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_VALUE" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DIMENSION_VALUE"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DECIMAL" precision="12" scale="2" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

<DIElement name="DI_ERRORACTION" datatype="VARCHAR" size="1" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DI_ERRORACTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DI_ERRORCOLUMNS" datatype="VARCHAR" size="500" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DI_ERRORCOLUMNS"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="$G_BATCH_ID" >

<VARIABLE_REFERENCE name="$G_BATCH_ID" />

</DIExpression>

<DIExpression isString="true" expr="$G_PROCESS_ID" >

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.PERIOD_DATE_START" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="PERIOD_DATE_START" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.PERIOD_DATE_END" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="PERIOD_DATE_END" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DIMENSION_VALUE" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DIMENSION_VALUE" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="METRIC_AMOUNT" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DI_ERRORACTION" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DI_ERRORACTION" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DI_ERRORCOLUMNS" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DI_ERRORCOLUMNS" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="VLDT_VALID_DIMS_Fail" />

</DIFrom>

<DIWhere>

<DIExpression isString="true" expr="(1 = 2)" >

<LOGICAL_OP op="EQ">

<CONSTANT value="1" datatype="INT" />

<CONSTANT value="2" datatype="INT" />

</LOGICAL_OP>

</DIExpression>

</DIWhere>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="VLDT_VALID_DIMS_Pass"/>

<DIAttribute name="ui_display_name" value="QRY_PREP_TC"/>

</DIUIOptions>

<DISchema name="QRY_PREP_TC" >

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="lookup_ext([DW_DS.DW_ALIAS.PERIOD_DIM, 'PRE_LOAD_CACHE', 'MAX'], [ PK_PERIOD_ID ], [ -2 ], [ START_DATE, '&lt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, END_DATE, '&gt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, PERIODICITY, '=', 'DAILY', FINANCIAL_USAGE_TYPE, '=', 'FISCAL' ])"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_ID ], [ -2 ], [ DIMENSION_NAME, '=', VLDT_VALID_DIMS_Pass.DIMENSION_NAME, DIMENSION_VALUE, '=', VLDT_VALID_DIMS_Pass.DIMENSION_VALUE  ]) &#xD;&#xA;SET(&quot;run_as_separate_process&quot; = 'no')"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_DK" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_DK ], [ -2 ], [ DIMENSION_NAME, '=', VLDT_VALID_DIMS_Pass.DIMENSION_NAME, DIMENSION_VALUE, '=', VLDT_VALID_DIMS_Pass.DIMENSION_VALUE  ]) &#xD;&#xA;SET(&quot;run_as_separate_process&quot; = 'no')"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DOUBLE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="NULL"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="lookup_ext([DW_DS.DW_ALIAS.PERIOD_DIM, 'PRE_LOAD_CACHE', 'MAX'], [ PK_PERIOD_ID ], [ -2 ], [ START_DATE, '&lt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, END_DATE, '&gt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, PERIODICITY, '=', 'DAILY', FINANCIAL_USAGE_TYPE, '=', 'FISCAL' ]) " >

<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_DS" tableOwner="DW_ALIAS" tableName="PERIOD_DIM" >

<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />

<CONSTANT value="MAX" datatype="VARCHAR" size="3" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="PERIOD_DATE_START" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="PERIOD_DATE_START" />

<CONSTANT value="DAILY" datatype="VARCHAR" size="5" />

<CONSTANT value="FISCAL" datatype="VARCHAR" size="6" />

<CONSTANT value="-2" datatype="INT" />

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_ID ], [ -2 ], [ DIMENSION_NAME, '=', VLDT_VALID_DIMS_Pass.DIMENSION_NAME, DIMENSION_VALUE, '=', VLDT_VALID_DIMS_Pass.DIMENSION_VALUE ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >

<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_DS" tableOwner="DW_ALIAS" tableName="FEDERATED_DIM_V" >

<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />

<CONSTANT value="MAX" datatype="VARCHAR" size="3" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_NAME" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_VALUE" />

<CONSTANT value="-2" datatype="INT" />

<DIAttributes>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_DK ], [ -2 ], [ DIMENSION_NAME, '=', VLDT_VALID_DIMS_Pass.DIMENSION_NAME, DIMENSION_VALUE, '=', VLDT_VALID_DIMS_Pass.DIMENSION_VALUE ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >

<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_DS" tableOwner="DW_ALIAS" tableName="FEDERATED_DIM_V" >

<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />

<CONSTANT value="MAX" datatype="VARCHAR" size="3" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_NAME" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_VALUE" />

<CONSTANT value="-2" datatype="INT" />

<DIAttributes>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="METRIC_AMOUNT" />

</DIExpression>

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="VLDT_VALID_DIMS_Pass" />

</DIFrom>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS"/>

<DIAttribute name="ui_display_name" value="QRY_REMOVE_DUMMY"/>

<DIAttribute name="ui_where_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME IS NOT NULL AND METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME!='DUMMY - DO NOT REMOVE'"/>

</DIUIOptions>

<DISchema name="QRY_REMOVE_DUMMY" >

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_START" datatype="DATE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_START"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_END" datatype="DATE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_END"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_VALUE" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_VALUE"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DOUBLE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_START" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="PERIOD_DATE_START" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_END" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="PERIOD_DATE_END" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_VALUE" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="DIMENSION_VALUE" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_AMOUNT" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="METRIC_ALLOCATION_EXTN_SOURCE_XLS" />

</DIFrom>

<DIWhere>

<DIExpression isString="true" expr="((METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME IS NOT  NULL ) AND&#xA;   (METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME != 'DUMMY - DO NOT REMOVE'))" >

<LOGICAL_OP op="AND">

<LOGICAL_OP op="IS NOT NULL">

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_NAME" />

</LOGICAL_OP>

<LOGICAL_OP op="NE">

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_NAME" />

<CONSTANT value="DUMMY - DO NOT REMOVE" datatype="VARCHAR" size="21" />

</LOGICAL_OP>

</LOGICAL_OP>

</DIExpression>

</DIWhere>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="SRCSTAGING_DS" ownerName="SRCSTAGING_ALIAS" tableName="ALLOCATION_METRIC_VALF" >

<DIInputView name="QRY_REFORMAT_FAILS"  />

<DIAttributes>

<DIAttribute name="LDRLiveLoad" value="no"/>

<DIAttribute name="Table_Type" value="TABLE"/>

<DIAttribute name="connection_port" value="no"/>

<DIAttribute name="ldr_configuration_enabled" value="yes"/>

<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">


<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>yes</auto_correct_using_merge>
<bulk_ldr_all_rows></bulk_ldr_all_rows>
<bulk_ldr_max_errors></bulk_ldr_max_errors>
<bulk_ldr_rows_per_commit>1000</bulk_ldr_rows_per_commit>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>no</ignore_columns_null>
<ignore_columns_value></ignore_columns_value>
<loader_auto_correct>no</loader_auto_correct>
<loader_bulk_load></loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map></loader_delete_map>
<loader_drop_and_create_table>yes</loader_drop_and_create_table>
<loader_insert_map></loader_insert_map>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>overflow_file</loader_overflow_file>
<loader_post_load1></loader_post_load1>
<loader_pre_load1></loader_pre_load1>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map></loader_update_map>
<loader_use_user_defined_keys>no</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>0</mssql_bulk_ldr_packet_size>
<overflow_file_format>write_data</overflow_file_format>
<overriding_substitution_parameter_for_tablename></overriding_substitution_parameter_for_tablename>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text></sql_text>
</LDRConfiguration>
</LDRConfigurations>

</DIAttribute>

<DIAttribute name="loader_template_table" value="no"/>

<DIAttribute name="name" value="SRCSTAGING_DS"/>

<DIAttribute name="use_unicode_varchar" value="no"/>

</DIAttributes>

</DIDatabaseTableTarget>



<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_DS" ownerName="DW_ALIAS" tableName="ALLOCATION_METRIC" >

<DIInputView name="QRY_ASSIGN_IDS_INS"  />

<DIAttributes>

<DIAttribute name="LDRLiveLoad" value="no"/>

<DIAttribute name="Table_Type" value="TABLE"/>

<DIAttribute name="connection_port" value="no"/>

<DIAttribute name="ldr_configuration_enabled" value="yes"/>

<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">


<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows></bulk_ldr_all_rows>
<bulk_ldr_max_errors></bulk_ldr_max_errors>
<bulk_ldr_rows_per_commit>1000</bulk_ldr_rows_per_commit>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>No</ignore_columns_null>
<ignore_columns_value></ignore_columns_value>
<loader_auto_correct>no</loader_auto_correct>
<loader_bulk_load></loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map></loader_delete_map>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map></loader_insert_map>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_DS_DW_ALIAS_ALLOCATION_METRIC.txt</loader_overflow_file>
<loader_post_load1>SET IDENTITY_INSERT dwt.allocation_metric OFF</loader_post_load1>
<loader_post_load2></loader_post_load2>
<loader_pre_load1>SET IDENTITY_INSERT dwt.allocation_metric ON</loader_pre_load1>
<loader_pre_load2></loader_pre_load2>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map></loader_update_map>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>0</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename></overriding_substitution_parameter_for_tablename>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text></sql_text>
</LDRConfiguration>
</LDRConfigurations>

</DIAttribute>

<DIAttribute name="loader_template_table" value="no"/>

<DIAttribute name="name" value="DW_DS"/>

<DIAttribute name="use_unicode_varchar" value="no"/>

</DIAttributes>

</DIDatabaseTableTarget>



<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_DS" ownerName="DW_ALIAS" tableName="ALLOCATION_METRIC" >

<DIInputView name="QRY_ASSIGN_IDS_UPD"  />

<DIAttributes>

<DIAttribute name="LDRLiveLoad" value="no"/>

<DIAttribute name="Table_Type" value="TABLE"/>

<DIAttribute name="connection_port" value="no"/>

<DIAttribute name="ldr_configuration_enabled" value="yes"/>

<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">


<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows></bulk_ldr_all_rows>
<bulk_ldr_max_errors></bulk_ldr_max_errors>
<bulk_ldr_rows_per_commit>1000</bulk_ldr_rows_per_commit>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>no</ignore_columns_null>
<ignore_columns_value></ignore_columns_value>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load></loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map></loader_delete_map>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map></loader_insert_map>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_DS_DW_ALIAS_ALLOCATION_METRIC.txt</loader_overflow_file>
<loader_post_load1>SET IDENTITY_INSERT dwt.allocation_metric OFF</loader_post_load1>
<loader_post_load2></loader_post_load2>
<loader_pre_load1>SET IDENTITY_INSERT dwt.allocation_metric ON</loader_pre_load1>
<loader_pre_load2></loader_pre_load2>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map></loader_update_map>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>0</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename></overriding_substitution_parameter_for_tablename>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text></sql_text>
</LDRConfiguration>
</LDRConfigurations>

</DIAttribute>

<DIAttribute name="loader_template_table" value="no"/>

<DIAttribute name="name" value="DW_DS"/>

<DIAttribute name="use_unicode_varchar" value="no"/>

</DIAttributes>

</DIDatabaseTableTarget>



</DITransforms>

<DIAttributes>

<DIAttribute name="Audit" hasNestedXMLTree ="true">


<Audit>
<AuditObjects>
</AuditObjects>
<AuditRules>
</AuditRules>
<Notifications>
<RaiseException Enabled="true" >
</RaiseException>
<Mail Enabled="false" ></Mail>
<Script Enabled="false" ></Script>
</Notifications>
</Audit>


</DIAttribute>

<DIAttribute name="Cache_type" value="pageable_cache"/>

<DIAttribute name="Parallelism_degree" value="0"/>

<DIAttribute name="allows_both_input_and_output" value="yes"/>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="use_dataflow_links" value="no"/>

<DIAttribute name="use_datastore_links" value="yes"/>

<DIAttribute name="validation_xform_exists" value="yes"/>

<DIAttribute name="validation_xform_stats" value="no"/>

</DIAttributes>

</DIDataflow>

<DIWorkflow name="ALLOCATION_METRIC_INITIAL_CONT_WF" typeId="2" >

<DISteps>

<DICallStep typeId="0"  calledObjectType="Workflow" name="ALLOCATION_METRIC_INITIAL_WF" >

</DICallStep>

</DISteps>

<DIAttributes>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="unit_of_recovery" value="no"/>

</DIAttributes>

</DIWorkflow>

<DIWorkflow name="ALLOCATION_METRIC_INITIAL_WF" typeId="2" >

<DIProperties>

<DIAttribute name="Description" value="This workflows sorts, identifies and processes new, update SCD1 and SCD2, and delete records."/>

</DIProperties>

<DISteps>

<DITryStep typeId="13" >

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_INITIAL_TRY"/>

</DIUIOptions>

<DISteps>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_INITIAL_START_SC"/>

<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;ABC_STARTWF_FN(workflow_name(), $G_PROCESS_ID);"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_startwf_fn(workflow_name(), $G_PROCESS_ID)" >

<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

<DICallStep typeId="1"  calledObjectType="Dataflow" name="ALLOCATION_METRIC_INITIAL_FF_DF" >

</DICallStep>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that closes the metadata for the workflow."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_INITIAL_END_SC"/>

<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK END OF WORKFLOW&#xD;&#xA;ABC_ENDWF_FN(workflow_name(), $G_PROCESS_ID);"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_endwf_fn(workflow_name(), $G_PROCESS_ID)" >

<FUNCTION_CALL name="abc_endwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

</DISteps>

<DICatch typeId="20" errorCode="210101" >

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_INITIAL_CATCH"/>

</DIUIOptions>

<DISteps>

<DIScript>

<DIUIOptions>

<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflows."/>

<DIAttribute name="ui_display_name" value="ALLOCATION_METRIC_INITIAL_FAIL_SC"/>

<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name(), $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>

</DIUIOptions>

<DIFunctionCallStep typeId="23" >

<DIExpression isString="true" expr="abc_failwf_fn(workflow_name(), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >

<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >

<FUNCTION_CALL name="workflow_name"  type="DI" />

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

<CONCAT>

<CONCAT>

<CONCAT>

<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />

<FUNCTION_CALL name="error_number"  type="DI" />

</CONCAT>

<CONSTANT value="\] " datatype="VARCHAR" size="3" />

</CONCAT>

<FUNCTION_CALL name="error_message"  type="DI" />

</CONCAT>

</FUNCTION_CALL>

</DIExpression>

</DIFunctionCallStep>

</DIScript>

</DISteps>

</DICatch>

</DITryStep>

</DISteps>

<DIAttributes>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="unit_of_recovery" value="no"/>

</DIAttributes>

</DIWorkflow>

<DIDataflow name="ALLOCATION_METRIC_INITIAL_FF_DF" typeId="1" >

<DIProperties>

<DIAttribute name="Description" value="The dataflow for extraction sources data from the defined source table.  Data is pulled from the source table based on the source tables LASTMODDATE value.  All data that was inserted or updated after a specific date will be loaded into the target file.  &#xA;The file that is created by the process will be a delimited file.  The delimiter for this file is |^|.  The dataflow not only loads the target file it also writes an audit file.  The audit file contains the source count and the target count based on the specific where clause.  This file will be used by an ABC audit process outside of the ETL process."/>

</DIProperties>

<DITransforms>

<DIExcelSource typeID="130" datastoreName="METRIC_ALLOCATION_EXTN_SOURCE_XLS" name="METRIC_ALLOCATION_EXTN_SOURCE_XLS" >

<DIOutputView name="METRIC_ALLOCATION_EXTN_SOURCE_XLS"  />

<DIAttributes>

<DIAttribute name="MSExcel_capture_data_conversion" value="no"/>

<DIAttribute name="cache" value="no"/>

<DIAttribute name="connection_port" value="no"/>

<DIAttribute name="reader_filename_col" value="DI_FILENAME"/>

<DIAttribute name="reader_filename_col_size" value="100"/>

<DIAttribute name="reader_filename_only" value="yes"/>

<DIAttribute name="reader_include_filename" value="no"/>

<DIAttribute name="table_weight" value="0"/>

</DIAttributes>

</DIExcelSource>



<DITransformCall typeId="111" name="Validation" >

<DIUIOptions>

<DIAttribute name="ui_display_name" value="VLDT_VALID_DIMS"/>

</DIUIOptions>

<DIInputView name="QRY_REMOVE_DUMMY"  />

<DISchema name="VLDT_VALID_DIMS_Pass" >

</DISchema>

<DISchema name="VLDT_VALID_DIMS_Fail" >

</DISchema>

<DIAttributes>

<DIAttribute name="validation_rules" hasNestedXMLTree ="true">


<Rules collectStats="false" collectData="false" >
<Column name="QRY_REMOVE_DUMMY.DIMENSION_NAME" enableValidation="false" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>QRY_REMOVE_DUMMY.DIMENSION_NAME = lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_NAME ], [ -2 ], [ DIMENSION_NAME, '=', QRY_REMOVE_DUMMY.DIMENSION_NAME ])&#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.DIMENSION_VALUE" enableValidation="true" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>QRY_REMOVE_DUMMY.DIMENSION_VALUE != lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_VALUE ], [ -2 ], [ DIMENSION_NAME, '=', QRY_REMOVE_DUMMY.DIMENSION_NAME ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.METRIC_AMOUNT" enableValidation="true" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="1">
<UIValue1>&gt;</UIValue1>
<UIValue2>0</UIValue2>
<Custom>QRY_REMOVE_DUMMY.METRIC_AMOUNT &gt; 0</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.PERIOD_DATE_START" enableValidation="true" noValidationWhenNull="false" >
<RuleName>VALID_PERIOD</RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>(lookup_ext([DW_DS.DW_ALIAS.PERIOD_DIM, 'PRE_LOAD_CACHE', 'MAX'], [ PK_PERIOD_ID ], [ -2 ], [ START_DATE, '&lt;=', QRY_REMOVE_DUMMY.PERIOD_DATE_START, END_DATE, '&gt;=', QRY_REMOVE_DUMMY.PERIOD_DATE_END, PERIODICITY, '=', 'MONTHLY', FINANCIAL_USAGE_TYPE, '=', 'FISCAL' ])  != -2) AND QRY_REMOVE_DUMMY.PERIOD_DATE_START&lt;=QRY_REMOVE_DUMMY.PERIOD_DATE_END&#xD;&#xA;</Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
<Column name="QRY_REMOVE_DUMMY.METRIC_NAME" enableValidation="true" noValidationWhenNull="false" >
<RuleName></RuleName>
<Description></Description>
<Expression uiSelection="6">
<UIValue1></UIValue1>
<UIValue2></UIValue2>
<Custom>(QRY_REMOVE_DUMMY.METRIC_NAME IS NOT  NULL ) </Custom>
</Expression>
<Action sendTo="0" substOnFail="false" substValue="" />
</Column>
</Rules>


</DIAttribute>

</DIAttributes>

</DITransformCall>

<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="VLDT_VALID_DIMS_Pass"/>

<DIAttribute name="ui_display_name" value="QRY_ASSIGN_IDS"/>

</DIUIOptions>

<DISchema name="QRY_ASSIGN_IDS" >

<DIElement name="ID" datatype="INT" key="true" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="greatest(5+gen_row_num())"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="50" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="100" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="50" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="lookup_ext([DW_DS.DW_ALIAS.PERIOD_DIM, 'PRE_LOAD_CACHE', 'MAX'], [ PK_PERIOD_ID ], [ -2 ], [ START_DATE, '&lt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, END_DATE, '&gt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, PERIODICITY, '=', 'DAILY', FINANCIAL_USAGE_TYPE, '=', 'FISCAL' ])"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_ID" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_ID ], [ -2 ], [ DIMENSION_NAME, '=', VLDT_VALID_DIMS_Pass.DIMENSION_NAME, DIMENSION_VALUE, '=', VLDT_VALID_DIMS_Pass.DIMENSION_VALUE  ]) &#xD;&#xA;SET(&quot;run_as_separate_process&quot; = 'no')"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_DK" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_DK ], [ -2 ], [ DIMENSION_NAME, '=', VLDT_VALID_DIMS_Pass.DIMENSION_NAME, DIMENSION_VALUE, '=', VLDT_VALID_DIMS_Pass.DIMENSION_VALUE  ]) &#xD;&#xA;SET(&quot;run_as_separate_process&quot; = 'no')"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DECIMAL" precision="12" scale="2" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Pass.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_DURABLE_KEY" datatype="INT" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="greatest(5+gen_row_num())"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_CREATEDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="sysdate()"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_LASTMODDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="null"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_DELETEDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="null"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_TRANSENDDATE" datatype="DATETIME" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="null"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_TRANSLASTIND" datatype="VARCHAR" size="1" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="'Y'"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_ACTIVESTATUSIND" datatype="VARCHAR" size="1" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="'Y'"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="greatest((5 + gen_row_num()))" >

<FUNCTION_CALL name="greatest"  type="DI" >

<ADD>

<CONSTANT value="5" datatype="INT" />

<FUNCTION_CALL name="gen_row_num"  type="DI" />

</ADD>

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="lookup_ext([DW_DS.DW_ALIAS.PERIOD_DIM, 'PRE_LOAD_CACHE', 'MAX'], [ PK_PERIOD_ID ], [ -2 ], [ START_DATE, '&lt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, END_DATE, '&gt;=', VLDT_VALID_DIMS_Pass.PERIOD_DATE_START, PERIODICITY, '=', 'DAILY', FINANCIAL_USAGE_TYPE, '=', 'FISCAL' ]) " >

<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_DS" tableOwner="DW_ALIAS" tableName="PERIOD_DIM" >

<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />

<CONSTANT value="MAX" datatype="VARCHAR" size="3" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="PERIOD_DATE_START" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="PERIOD_DATE_START" />

<CONSTANT value="DAILY" datatype="VARCHAR" size="5" />

<CONSTANT value="FISCAL" datatype="VARCHAR" size="6" />

<CONSTANT value="-2" datatype="INT" />

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_ID ], [ -2 ], [ DIMENSION_NAME, '=', VLDT_VALID_DIMS_Pass.DIMENSION_NAME, DIMENSION_VALUE, '=', VLDT_VALID_DIMS_Pass.DIMENSION_VALUE ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >

<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_DS" tableOwner="DW_ALIAS" tableName="FEDERATED_DIM_V" >

<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />

<CONSTANT value="MAX" datatype="VARCHAR" size="3" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_NAME" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_VALUE" />

<CONSTANT value="-2" datatype="INT" />

<DIAttributes>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="lookup_ext([DW_DS.DW_ALIAS.FEDERATED_DIM_V, 'PRE_LOAD_CACHE', 'MAX'], [ DIMENSION_DK ], [ -2 ], [ DIMENSION_NAME, '=', VLDT_VALID_DIMS_Pass.DIMENSION_NAME, DIMENSION_VALUE, '=', VLDT_VALID_DIMS_Pass.DIMENSION_VALUE ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >

<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_DS" tableOwner="DW_ALIAS" tableName="FEDERATED_DIM_V" >

<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />

<CONSTANT value="MAX" datatype="VARCHAR" size="3" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_NAME" />

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="DIMENSION_VALUE" />

<CONSTANT value="-2" datatype="INT" />

<DIAttributes>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Pass.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Pass" column="METRIC_AMOUNT" />

</DIExpression>

<DIExpression isString="true" expr="greatest((5 + gen_row_num()))" >

<FUNCTION_CALL name="greatest"  type="DI" >

<ADD>

<CONSTANT value="5" datatype="INT" />

<FUNCTION_CALL name="gen_row_num"  type="DI" />

</ADD>

</FUNCTION_CALL>

</DIExpression>

<DIExpression isString="true" expr="sysdate()" >

<FUNCTION_CALL name="sysdate"  type="DI" />

</DIExpression>

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

<DIExpression isString="true" expr=" NULL " >

<CONSTANT_NULL /></DIExpression>

<DIExpression isString="true" expr="'Y'" >

<CONSTANT value="Y" datatype="VARCHAR" size="1" />

</DIExpression>

<DIExpression isString="true" expr="'Y'" >

<CONSTANT value="Y" datatype="VARCHAR" size="1" />

</DIExpression>

<DIExpression isString="true" expr="$G_BATCH_ID" >

<VARIABLE_REFERENCE name="$G_BATCH_ID" />

</DIExpression>

<DIExpression isString="true" expr="$G_PROCESS_ID" >

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="VLDT_VALID_DIMS_Pass" />

</DIFrom>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="VLDT_VALID_DIMS_Fail"/>

<DIAttribute name="ui_display_name" value="QRY_REFORMAT_FAILS"/>

</DIUIOptions>

<DISchema name="QRY_REFORMAT_FAILS" >

<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_START" datatype="DATE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.PERIOD_DATE_START"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_END" datatype="DATE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.PERIOD_DATE_END"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_VALUE" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DIMENSION_VALUE"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DOUBLE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

<DIElement name="DI_ERRORACTION" datatype="VARCHAR" size="1" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DI_ERRORACTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DI_ERRORCOLUMNS" datatype="VARCHAR" size="500" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="VLDT_VALID_DIMS_Fail.DI_ERRORCOLUMNS"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="$G_BATCH_ID" >

<VARIABLE_REFERENCE name="$G_BATCH_ID" />

</DIExpression>

<DIExpression isString="true" expr="$G_PROCESS_ID" >

<VARIABLE_REFERENCE name="$G_PROCESS_ID" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.PERIOD_DATE_START" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="PERIOD_DATE_START" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.PERIOD_DATE_END" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="PERIOD_DATE_END" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DIMENSION_VALUE" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DIMENSION_VALUE" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="METRIC_AMOUNT" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DI_ERRORACTION" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DI_ERRORACTION" />

</DIExpression>

<DIExpression isString="true" expr="VLDT_VALID_DIMS_Fail.DI_ERRORCOLUMNS" >

<COLUMN_REFERENCE  qualifier1="VLDT_VALID_DIMS_Fail" column="DI_ERRORCOLUMNS" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="VLDT_VALID_DIMS_Fail" />

</DIFrom>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIQuery typeId="122"  >

<DIUIOptions>

<DIAttribute name="ui_acta_from_schema_0" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS"/>

<DIAttribute name="ui_display_name" value="QRY_REMOVE_DUMMY"/>

<DIAttribute name="ui_where_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME IS NOT NULL AND &#xD;&#xA;METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME != 'DUMMY - DO NOT REMOVE'"/>

</DIUIOptions>

<DISchema name="QRY_REMOVE_DUMMY" >

<DIElement name="METRIC_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_DESCRIPTION" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_DESCRIPTION"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_NAME" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_NAME"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_START" datatype="DATE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_START"/>

</DIAttributes>

</DIElement>

<DIElement name="PERIOD_DATE_END" datatype="DATE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_END"/>

</DIAttributes>

</DIElement>

<DIElement name="DIMENSION_VALUE" datatype="VARCHAR" size="255" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_VALUE"/>

</DIAttributes>

</DIElement>

<DIElement name="METRIC_AMOUNT" datatype="DOUBLE" >

<DIAttributes>

<DIAttribute name="Description" value=""/>

<DIAttribute name="ui_mapping_text" value="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_AMOUNT"/>

</DIAttributes>

</DIElement>

</DISchema>

<DISelect>

<DIProjection>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_NAME" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_DESCRIPTION" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_DESCRIPTION" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_NAME" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="DIMENSION_NAME" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_START" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="PERIOD_DATE_START" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.PERIOD_DATE_END" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="PERIOD_DATE_END" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.DIMENSION_VALUE" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="DIMENSION_VALUE" />

</DIExpression>

<DIExpression isString="true" expr="METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_AMOUNT" >

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_AMOUNT" />

</DIExpression>

</DIProjection>

<DIFrom>

<DITableSpec name="METRIC_ALLOCATION_EXTN_SOURCE_XLS" />

</DIFrom>

<DIWhere>

<DIExpression isString="true" expr="((METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME IS NOT  NULL ) AND&#xA;   (METRIC_ALLOCATION_EXTN_SOURCE_XLS.METRIC_NAME != 'DUMMY - DO NOT REMOVE'))" >

<LOGICAL_OP op="AND">

<LOGICAL_OP op="IS NOT NULL">

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_NAME" />

</LOGICAL_OP>

<LOGICAL_OP op="NE">

<COLUMN_REFERENCE  qualifier1="METRIC_ALLOCATION_EXTN_SOURCE_XLS" column="METRIC_NAME" />

<CONSTANT value="DUMMY - DO NOT REMOVE" datatype="VARCHAR" size="21" />

</LOGICAL_OP>

</LOGICAL_OP>

</DIExpression>

</DIWhere>

</DISelect>

<DIAttributes>

<DIAttribute name="distinct_run_as_separate_process" value="no"/>

<DIAttribute name="group_by_run_as_separate_process" value="no"/>

<DIAttribute name="join_run_as_separate_process" value="no"/>

<DIAttribute name="order_by_run_as_separate_process" value="no"/>

<DIAttribute name="run_as_separate_process" value="no"/>

</DIAttributes>

</DIQuery>



<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="SRCSTAGING_DS" ownerName="SRCSTAGING_ALIAS" tableName="ALLOCATION_METRIC_VALF" >

<DIInputView name="QRY_REFORMAT_FAILS"  />

<DIAttributes>

<DIAttribute name="LDRLiveLoad" value="no"/>

<DIAttribute name="Table_Type" value="TABLE"/>

<DIAttribute name="connection_port" value="no"/>

<DIAttribute name="ldr_configuration_enabled" value="yes"/>

<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">


<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows></bulk_ldr_all_rows>
<bulk_ldr_max_errors></bulk_ldr_max_errors>
<bulk_ldr_rows_per_commit></bulk_ldr_rows_per_commit>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>No</ignore_columns_null>
<ignore_columns_value></ignore_columns_value>
<loader_auto_correct>no</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map></loader_delete_map>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map></loader_insert_map>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>overflow_file</loader_overflow_file>
<loader_post_load1></loader_post_load1>
<loader_pre_load1></loader_pre_load1>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map></loader_update_map>
<loader_use_user_defined_keys>no</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename></overriding_substitution_parameter_for_tablename>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text></sql_text>
</LDRConfiguration>
</LDRConfigurations>

</DIAttribute>

<DIAttribute name="loader_template_table" value="no"/>

<DIAttribute name="name" value="SRCSTAGING_DS"/>

<DIAttribute name="use_unicode_varchar" value="no"/>

</DIAttributes>

</DIDatabaseTableTarget>



<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_DS" ownerName="DW_ALIAS" tableName="ALLOCATION_METRIC" >

<DIInputView name="QRY_ASSIGN_IDS"  />

<DIAttributes>

<DIAttribute name="LDRLiveLoad" value="no"/>

<DIAttribute name="Table_Type" value="TABLE"/>

<DIAttribute name="connection_port" value="no"/>

<DIAttribute name="ldr_configuration_enabled" value="yes"/>

<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">


<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows></bulk_ldr_all_rows>
<bulk_ldr_max_errors></bulk_ldr_max_errors>
<bulk_ldr_rows_per_commit>1000</bulk_ldr_rows_per_commit>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>No</ignore_columns_null>
<ignore_columns_value></ignore_columns_value>
<loader_auto_correct>no</loader_auto_correct>
<loader_bulk_load></loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map></loader_delete_map>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map></loader_insert_map>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_DS_DW_ALIAS_ALLOCATION_METRIC.txt</loader_overflow_file>
<loader_post_load1>SET IDENTITY_INSERT dwt.allocation_metric OFF</loader_post_load1>
<loader_post_load2></loader_post_load2>
<loader_pre_load1>SET IDENTITY_INSERT dwt.allocation_metric ON</loader_pre_load1>
<loader_pre_load2></loader_pre_load2>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map></loader_update_map>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>0</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename></overriding_substitution_parameter_for_tablename>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text></sql_text>
</LDRConfiguration>
</LDRConfigurations>

</DIAttribute>

<DIAttribute name="loader_template_table" value="no"/>

<DIAttribute name="name" value="DW_DS"/>

<DIAttribute name="use_unicode_varchar" value="no"/>

</DIAttributes>

</DIDatabaseTableTarget>



</DITransforms>

<DIAttributes>

<DIAttribute name="Audit" hasNestedXMLTree ="true">


<Audit>
<AuditObjects>
</AuditObjects>
<AuditRules>
</AuditRules>
<Notifications>
<RaiseException Enabled="true" >
</RaiseException>
<Mail Enabled="false" ></Mail>
<Script Enabled="false" ></Script>
</Notifications>
</Audit>


</DIAttribute>

<DIAttribute name="Cache_type" value="pageable_cache"/>

<DIAttribute name="Parallelism_degree" value="0"/>

<DIAttribute name="allows_both_input_and_output" value="yes"/>

<DIAttribute name="run_once" value="no"/>

<DIAttribute name="use_dataflow_links" value="no"/>

<DIAttribute name="use_datastore_links" value="yes"/>

<DIAttribute name="validation_xform_exists" value="yes"/>

<DIAttribute name="validation_xform_stats" value="no"/>

</DIAttributes>

</DIDataflow>



</DataIntegratorExport>



